I can't because it's proprietary but I can approximate it.
Basically, so far in the codebase, the unit of work is implemented like that (code not mine):
public async Task<int> CreateOrderAsync()
{
// UseTransaction begins the transaction that will get shared
UseTransaction(_connection.BeginTransaction());
try
{
// dapper stuff
foreach (var item in items)
{
// do stuff
}
// transaction gets commited at the end
_transaction.Commit();
return orderId;
}
catch
{
_transaction.Rollback();
throw;
}
}
public async Task<int> CreateOrderAsync()
{
// UseTransaction begins the transaction that will get shared