There is an overload of the ExecuteSqlCommand
method that prevents this behavior:
db.Database.ExecuteSqlCommand(TransactionalBehavior.DoNotEnsureTransaction, sql, parameters);
There is an overload of the ExecuteSqlCommand
method that prevents this behavior:
db.Database.ExecuteSqlCommand(TransactionalBehavior.DoNotEnsureTransaction, sql, parameters);