Skip to content
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

Closed
divega opened this issue May 31, 2016 · 5 comments

Comments

Projects
None yet
7 participants
@divega
Copy link
Member

commented May 31, 2016

(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 dotnet/corefx#2949 is implemented.

@divega

This comment has been minimized.

Copy link
Member Author

commented Oct 10, 2016

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.

@roji

This comment has been minimized.

Copy link
Member

commented Jul 4, 2017

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.

@patricknolan

This comment has been minimized.

Copy link

commented Jul 21, 2017

Hi...is the use of TransactionScope with EntityFramework Core now supported?

@divega divega modified the milestones: 2.1.0, Backlog Jul 27, 2017

@divega divega added the pri0 label Jul 27, 2017

@divega divega changed the title Consider enabling support for ambient transactions in platforms that have it Enabling support for ambient transactions in platforms that have it Aug 7, 2017

@divega divega changed the title Enabling support for ambient transactions in platforms that have it Enabling support for System.Transactions' ambient transactions in platforms that have it Aug 7, 2017

@divega divega changed the title Enabling support for System.Transactions' ambient transactions in platforms that have it Enable support for System.Transactions Aug 7, 2017

@bricelam

This comment has been minimized.

Copy link
Member

commented Aug 16, 2017

Will we need aspnet/Microsoft.Data.Sqlite#294 for this?

@AndriySvyryd

This comment has been minimized.

Copy link
Member

commented Aug 16, 2017

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.

AndriySvyryd added a commit that referenced this issue Aug 24, 2017

AndriySvyryd added a commit that referenced this issue Aug 25, 2017

AndriySvyryd added a commit that referenced this issue Aug 25, 2017

AndriySvyryd added a commit that referenced this issue Aug 25, 2017

AndriySvyryd added a commit that referenced this issue Aug 28, 2017

AndriySvyryd added a commit that referenced this issue Aug 29, 2017

AndriySvyryd added a commit that referenced this issue Aug 29, 2017

AndriySvyryd added a commit that referenced this issue Aug 31, 2017

AndriySvyryd added a commit that referenced this issue Aug 31, 2017

AndriySvyryd added a commit that referenced this issue Aug 31, 2017

AndriySvyryd added a commit that referenced this issue Sep 2, 2017

AndriySvyryd added a commit that referenced this issue Sep 7, 2017

@AndriySvyryd AndriySvyryd removed their assignment Feb 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.