Profiled with SQL Server Profiler: EF 6 wraps every single stored procedure call with BEGIN TRAN
and COMMIT TRAN
.
Is not it a breaking cha
In EF 6.1.2, a flag controls the behavior. Setting EnsureTransactionsForFunctionsAndCommands to false will affect SPs that have been imported into an entity (these call ExecuteFunction() internally).
using (SomeEf6Context ctx = NewContext())
{
ctx.Configuration.EnsureTransactionsForFunctionsAndCommands = false;
// Call an imported SP
}
The setting will not affect any SaveChanges() calls.
MSDN Link