You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#28711 is replacing AutoTransactionsEnable with a 3-value enum (WhenNeeded, Always, Never), @AndriySvyryd suggested adding a WhenNotInvokingStoredProcedure for this. Some possible drawbacks:
We discussed possibly only exempting the specific sproc from the transaction in the batch, i.e. wrapping all the other modification commands in transactions, before and after.
If we do this, we need specific metadata on the sproc rather than a global AutoTransactionBehavior setting.
This is maybe of somewhat limited value, because if there's a failure there's still the possibility of inconsistency. This would only reduce the change of an inconsistency (i.e. only if the failure occurs occurs inside or after the sproc).
This would require users to manually set AutoTransactionBehavior everywhere where the specific sproc is being used. Specifying this once in metadata would be a better user experience.
Some sprocs cannot be executed in a transaction. These need a configuration flag that will affect SaveChanges and the execution strategy.
Current workaround is to use a transaction interceptor.
Split off from #245
The text was updated successfully, but these errors were encountered: