-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Support System.Transactions in SqlClient for .NET Core #18918
Comments
Does SqlClient support some functionality such as EnlistTransaction for System.Transactions on .net core? There is a user reporting not able to use SqlConnection with System.Transactions on .net core. Please share current status and plan for supporting System.Transactions in SqlClient on .net core. |
The development of the feature is underway. Right now we don't support EnlistTransaction or any API related to System.Transactions in SqlClient. |
According to https://github.com/dotnet/corefx/issues/12534, ambient transaction enlistment is not included with .net core 2.0.
OK. I can live without Ambient Transactions, but are you saying that we can't even use explicit Transactions? How are you supposed to do anything remotely serious with SQL without Transactions? |
How does this work with an n-Tier design? That is, how do I create a transaction that commits to my in-memory model and my persistent store (SQL Server) as an atomic action? I don't see how I do this with an SqlTransaction. |
Ambient Transaction and Transaction related APIs were ported from Framework: dotnet/corefx#22059 |
Yes. I see the Transactions. Yes. I see the SqlClient library. No, I can't get them to work together like they do in .NET Framework 4.7. I get 'Enlisting in Ambient transactions is not supported' when I try to execute EnlistTransaction(). I don't need Ambient Transactions, but I need some mechanism to make sure that my in-memory update and my SQL update are committed as a unit. If there's some new library or paradigm, I'm happy to look at it. |
* Enable SqlDataRecord TVPs on netstandard1.3. * Update netstandard2.0 SqlClient references to Preview 2. * Skip TransactionScope tests for netcoreapp2.0. - According to https://github.com/dotnet/corefx/issues/12534, ambient transaction enlistment is not included with .net core 2.0. * Update references in Dapper.StrongName. * Disable parallel test run to stabilize flaky type handler tests. * Disable parallel test run by assembly attribute. * Move Issue461 tests to TypeHandlerTests. * Group type handler tests in a collection, re-enable parallelization. - Being part of the same collection, type handler tests will run sequentially. All other tests can run in parallel. * Move tests relying on query cache & type maps to a separate collection.
Given
System.Transactions
is going to be included in 1.2 (see https://github.com/dotnet/corefx/issues/2949) the next step seems to be to bring auto-enlistment of ambient transactions and related behaviors into the .NET Core version of SqlClient.Note that the corresponding EF Core feature (tracked at dotnet/efcore#5595) will depend on this to work with SQL Server.
The text was updated successfully, but these errors were encountered: