-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
(Forked from #4147 which was mainly about fixing the misleading exception message we throw to indicate that we don't support System.Transactions
)
By design we don't support System.Transactions
(a.k.a. ambient transactions / TransactionScope
and or CommitableTransaction
) functionality in EF Core 1.0.0.
In full .NET framework connection objects such as SqlConnection
will still auto-enlist on Open()
or OpenAsync()
but we have code in EF Core to detect the presence of an ambient transaction an throw.
The new ConfigureWarnings()
API allows turning the error into a warning or to ignore it completely, but since EF Core will always just start a local transaction in the connection anyway (i.e. with BeginTransaction()
) the feature is actually not usable.
This issue is about the possibility of getting out of the way from System.Transactions
by conditionally skipping the creation of the local database transaction in full .NET or in any other platform that supports it e.g. when/if https://github.com/dotnet/corefx/issues/2949 is implemented.