public int MergePerson(DbTransaction transaction, PersonRowData oldPerson, Person newPerson)
 {
     return
         transaction.ExecuteNonQuery(
             tables.Join(";\n\n\n", t => t.UpdateSql)
           + ";\n\n\nUPDATE Data.MasterDirectory SET StripeId = @oldStripeId WHERE Id = @newId AND StripeId IS NULL"
           + ";\n\n\nDELETE FROM Data.MasterDirectory WHERE Id = @oldId", new { oldId = oldPerson.Person.Id, newId = newPerson.Id, oldStripeId = oldPerson.StripeId });
 }
 public int DeletePerson(DbTransaction transaction, Person person)
 {
     return transaction.ExecuteNonQuery(tables.Join(";\n", t => t.DeleteSql) + ";\n\nDELETE FROM Data.MasterDirectory WHERE Id = @Id", new { person.Id });
 }
            public void Execute(DbTransaction transaction)
            {
                var lines = File.ReadLines(FilePath);
                var builder = new StringBuilder();

                foreach (var line in lines) {
                    if (line.Trim().Equals("GO", StringComparison.OrdinalIgnoreCase)) {
                        transaction.ExecuteNonQuery(builder.ToString());
                        builder.Clear();
                    } else
                        builder.AppendLine(line);
                }
                transaction.ExecuteNonQuery(builder.ToString());
            }