I am trying to develop a module that integrates with Orchard, the primary purpose of this module is to display client details from our internal sql database. What i am struggling to understand is how to prevent transactional errors occurring.
I understand that Orchard is creating a new TransactionScope for the lifetime of the request and that my SqlConnection is using the ambient transaction when connecting to the database.
I found the following messages that show a workaround by creating a TransactionScope around the data access code.
Is this the only workaround?
I have data access code in many places, controllers, driver, authorization, filter providers. Is there a common place i could create this new transaction scope, i.e ActionFilter so that it could be applied to just my module?