-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable support for System.Transactions #5595
Comments
Progress has been made for the feature to be available in .NET Core 1.2, although SqlClient for .NET Core still doesn't do anything with ambient transactions (plus auto-enlistment never stopped working in .NET Framework). Clearing up milestone and ownership so that we can decide what to do and who to assign it to in triage. |
Please note that Npgsql already supports .NET Standard 2.0, and so has System.Transaction support as well. In other words, adding System.Transaction support to EF Core doesn't necessarily depend on SqlClient adding support. |
Hi...is the use of TransactionScope with EntityFramework Core now supported? |
Will we need aspnet/Microsoft.Data.Sqlite#294 for this? |
We don't need it, since this is mostly about the work in Relational. It will probably still throw for providers that don't explicitly support it. |
(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 orCommitableTransaction
) functionality in EF Core 1.0.0.In full .NET framework connection objects such as
SqlConnection
will still auto-enlist onOpen()
orOpenAsync()
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. withBeginTransaction()
) 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.The text was updated successfully, but these errors were encountered: