/Rhino.Etl.Tests/LoadTest/BatchUpdateUserNames.cs
http://github.com/ayende/rhino-etl · C# · 26 lines · 19 code · 2 blank · 5 comment · 0 complexity · 926342f7d932ac0d5519524200383075 MD5 · raw file
- namespace Rhino.Etl.Tests.LoadTest
- {
- using System.Data.SqlClient;
- using Core;
- using Rhino.Etl.Core.Operations;
- public class BatchUpdateUserNames : SqlBatchOperation
- {
- public BatchUpdateUserNames()
- : base("test")
- {
- }
- /// <summary>
- /// Prepares the command from the given row
- /// </summary>
- /// <param name="row">The row.</param>
- /// <param name="command">The command.</param>
- protected override void PrepareCommand(Row row, SqlCommand command)
- {
- command.CommandText = "UPDATE Users SET Name = @Name, TestMsg = 'UpperCased' WHERE Id = @Id";
- command.Parameters.AddWithValue("@Name", row["Name"]);
- command.Parameters.AddWithValue("@Id", row["Id"]);
- }
- }
- }