Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: Async and Transactions

$
0
0

I'm assuming this is covered by this issue, but using EF6a2, if you do the following:

using (var txn = new TransactionScope())
{
    await SomeStuffAsync();
    txn.Complete();
}

You'll get an exception saying that "A TransactionScope must be disposed on the same thread that it was created".  Is there another way to do transactions while still supporting async?  If not, are there plans to address this?


Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>