Quantcast
Channel: User Simon_Weaver - Stack Overflow
Viewing all articles
Browse latest Browse all 116

Answer by Simon_Weaver for How to get isolation level in EF for MSSQL?

$
0
0

In EF Core this works:

System.Transactions.Transaction.Current.IsolationLevel

It's showing Serializable for me by default if I don't specify a level, and does show the updated value if I set it explicitly.

using (var tran = new TransactionScope(TransactionScopeOption.RequiresNew,       new TransactionOptions       {         //IsolationLevel = IsolationLevel.ReadCommitted,         Timeout = TimeSpan.FromMinutes(1),       }, TransactionScopeAsyncFlowOption.Enabled)) { }

Viewing all articles
Browse latest Browse all 116

Trending Articles



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