I call a stored procedure in Entity Framework 6, which can create databases and tables if necessary. It throws a mistake;
The message "CREATE DATABASE operation is not allowed in a transaction with multiple operations. \ R \ nLTER The DATABASE operator is not allowed in a transaction with multiple operations. \ R \ nThis CoreSnapshotJS3 does not exist. Make sure the name is entered correctly." line
I do not want this in a transaction and used this to suppress a transaction
using (var transation = new TransactionScope(TransactionScopeOption.Suppress)) { return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("spCreateSnapshotFromQueue", snapshotQueueIDParameter); }
It still causes an error.
How to stop automatic transactions?
source share