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

Workaround for apps dependent on DTC in respect to porting to NetCore 3.0 #589

Closed
iCodeWebApps opened this issue Dec 5, 2019 · 3 comments
Labels
area-System.Transactions untriaged New issue has not been triaged by the area owner

Comments

@iCodeWebApps
Copy link

All,

If your netcore app wraps multiple connections in a transactionscope, you will get a runtime error:
"This platform does not support distributed transactions."

I am wondering what's the best workaround for web apps that are being ported to netcore3, which used DTC. Is it to refactor to use UnitOfWork pattern?

I don't want to manage connections in my business layer, which is what TransactionScope helped with.

Thanks!

Related:
Open Issue: https://github.com/dotnet/corefx/issues/13532
Stack Overflow: https://stackoverflow.com/questions/56328832/transactionscope-throwing-exception-this-platform-does-not-support-distributed-t

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the untriaged New issue has not been triaged by the area owner label Dec 5, 2019
@randyburden
Copy link

We are also wanting to port from .NET Framework to .NET Core and have ran into the fact that DTC is not supported with TransactionScope which feels like a deal breaker in terms of us being able to port to .NET Core.

Our specific use cases are:

  1. We need to write to two different database tables residing on two separate SQL Servers and ensure it is all committed to the database atomically which we do today successfully using TransactionScope and DTC.
  2. We need to INSERT/UPDATE/DELETE multiple database tables in a single transaction from our business layer code which has no knowledge of the database. We accomplish this successfully today by creating a TransactionScope in our business layer which in turn makes multiple calls to our data access layer which performs the necessary database operations.

Since distributed transactions are not currently supported right now in .NET Core, what is the recommendation from Microsoft as a workaround?

@StephenBonikowsky StephenBonikowsky added this to Needs Triage in WCF Owned Areas Dec 9, 2019
@StephenBonikowsky
Copy link
Member

We are investigating the feasibility of bringing this feature to Core, please continue to track dotnet/corefx#13532 , that issue will be getting moved to this repo shortly.

WCF Owned Areas automation moved this from Needs Triage to Completed Dec 9, 2019
@StephenBonikowsky
Copy link
Member

Issue moved to dotnet/runtime #715

@HongGit HongGit closed this as completed Mar 12, 2020
@dotnet dotnet locked as resolved and limited conversation to collaborators Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Transactions untriaged New issue has not been triaged by the area owner
Projects
Development

No branches or pull requests

6 participants