Transaction
Ordinary ADO.NET transactions, shared across as many repository or connection calls as you need.
What it is
Transactions behave exactly like plain ADO.NET — there’s no separate transaction abstraction to learn. Begin one on the connection and pass it into any operation that should participate.
Sharing it across calls
using (var transaction = connection.EnsureOpen().BeginTransaction())
{
connection.Insert<Customer, int>(customer, transaction: transaction);
connection.Insert<Order, int>(order, transaction: transaction);
transaction.Commit();
}
The same object works whether you’re calling the connection directly or going through a repository — pass it to each call and commit once everything succeeds.