I just started playing around with Dapper. So far i love it. Does dapper not work with TransactionScope
? I noticed that even if i never call TransactionScope.Complete
then my changes are still committed to the database. If TransactionScope isn't supported now is there any plans in the future to support it? If not then you have to use traditional transaction management (System.Transactions.Transaction)?
Update: I just talked to Sam over Twitter. It should work. I'll update it tomorrow morning (at work) with the details to see if anyone can figure out why my changes were still being committed to the db even when i never called complete.
Dapper is a popular simple object mapping tool. It is designed primarily to be used in scenarios where you want to work with data in a strongly typed fashion - as business objects in a .
Dapper can be defined as a 'smart wallet' that supports ERC-721 token and a variety of ERC-20 tokens including EMONT (Etheremon), BNB (Binance), VEN (VeChain), and OMG (OmiseGo), to name a few. Dapper Labs uses the power of play for delivering blockchain-based experiences made for the real-world.
Dapper is the first blockchain interface that uses smart contract technology in the browser to make full custody over crypto assets safe and easy for everyday consumers. We built Dapper to make it easy to use the blockchain safely.
It was totally my fault and not fully understanding transactionscope. A connection is not automatically enlisted in transactionscope unless you open the connection within the transactionscope:
Automatic Enlistment
using (var scope = new TransactionScope()) { con.Open(); //update/delete/insert commands here ... scope.Complete(); }
Manual Enlistment
con.Open(); using (var scope = new TransactionScope()) { con.EnlistTransaction(Transaction.Current); //update/delte/insert statements here ... scope.Complete(); }
Details can be found here: Details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With