Setting Transaction Isolation Level in .NET / Entity Framework for SQL Server
问题 I am attempting to set the Transaction Isolation Level in .NET/C# for a Transaction. I am using the following code to set up the transaction: using (var db = new DbContext("ConnectionString")) { using (var transaction = new TransactionScope(TransactionScopeOption.RequiresNew, new TransactionOptions() { IsolationLevel = IsolationLevel.Snapshot })) { ...code here transaction.Complete(); } } Using SQL Server Profiler, this produces the following: set quoted_identifier on set arithabort off set