EF does not change the isolation level, the problem with serializable comes from a sad decision on the default isolation level of TransactionScope. EF opens transactions in read commited mode, but if you wrap it in a TransactionScope, the transaction will be serializable by default and EF will use that.
Solution: simply create the TransactionScope specifying the isolation level = read commited
using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted }))
{
scope.Complete();
}
"In either case, the isolation level of the transaction is whatever isolation level the database provider considers its default setting. By default, for instance, on SQL Server this is READ COMMITTED."
EF does not change the isolation level, the problem with serializable comes from a sad decision on the default isolation level of TransactionScope. EF opens transactions in read commited mode, but if you wrap it in a TransactionScope, the transaction will be serializable by default and EF will use that.
Solution: simply create the TransactionScope specifying the isolation level = read commited
Sources:
https://msdn.microsoft.com/en-us/data/dn456843.aspx
"In either case, the isolation level of the transaction is whatever isolation level the database provider considers its default setting. By default, for instance, on SQL Server this is READ COMMITTED."
http://referencesource.microsoft.com/#System.Transactions/System/Transactions/TransactionManager.cs,4853e046f5438f90,references