public void Store(BookOrderLineConflict bookOrderLineConflict) { var dto = bookOrderLineConflict.ToDto(); using (var connection = CreateConnection()) { connection.Open(); using (var transaction = connection.BeginTransaction()) { InsertBookOrderLineConflictAction.Execute(connection, dto); transaction.Commit(); } } }
public void Store(IEnumerable <BookOrderLineConflict> conflicts) { using (var connection = CreateConnection()) { connection.Open(); using (var transaction = connection.BeginTransaction()) { foreach (var bookOrderLineConflict in conflicts) { var dto = bookOrderLineConflict.ToDto(); InsertBookOrderLineConflictAction.Execute(connection, dto); } transaction.Commit(); } } }