Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to use transactions in DotNetNuke?

DotNetNuke transactions
0
Posted

How to use transactions in DotNetNuke?

0

When you create a transaction through the GetTransaction method, the DataProvider just creates a new connection and gives you the transaction. You would then need to manually use that transaction to perform whatever action you’re going to take against the database. There isn’t a way to pass that transaction so that it gets used by, for example, CreatePortal, or any other built-in DNN function. That functionality appears to be just for any additional database access you might make. In terms of how to wrap a call from the DNN core in a transaction, I don’t think you can. The cleanest solution I know to recommend (which, unfortunately, still isn’t very clean) is to manually call the stored procedure, using a transaction, rather than going through the controller class. What’s your use case, maybe I can recommend a solution that solves the problem some other way…

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.