C# – Using SQL transactions with Dapper

Using TransactionScope is the simplest way to execute multiple SQL commands in a transaction. Here’s an example of how to use it: When you call TransactionScope.Complete(), it commits the transaction. If you don’t call Complete(), it’ll rollback the transaction once it leaves the TransactionScope block. This keeps the code nice and clean and works well … Read more