/Rhino.Etl.Tests/Integration/WritePeople.cs
http://github.com/ayende/rhino-etl · C# · 29 lines · 25 code · 4 blank · 0 comment · 0 complexity · 0a337ed2df68d26a3118b07e7ea61d76 MD5 · raw file
- using System.Configuration;
- namespace Rhino.Etl.Tests.Integration
- {
- using System.Data;
- using Core;
- using Rhino.Etl.Core.Operations;
- public class WritePeople : OutputCommandOperation
- {
- public WritePeople() : base("test")
- {
- }
- public WritePeople(ConnectionStringSettings connectionStringSettings) : base(connectionStringSettings)
- {
- }
- protected override void PrepareCommand(IDbCommand cmd, Row row)
- {
- cmd.CommandText =
- @"INSERT INTO People (UserId, FirstName, LastName, Email) VALUES (@UserId, @FirstName, @LastName, @Email)";
- AddParameter("UserId", row["Id"]);
- AddParameter("FirstName", row["FirstName"]);
- AddParameter("LastName", row["LastName"]);
- AddParameter("Email", row["Email"]);
- }
- }
- }