How to use transactions in DotNetNuke?
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…