Guys you must be thinking why I have to do that ... I may be wrong but the I am designing a system
It has following layers
- Data Access Layer (Handles sql transactions)
- Data Managers
- Presentation Layers
Data manager call the data access layer to do the sql transaction. and particular function in Presentation layer call multiple data managers to do its job ...
if each data manager create separate instance for the Data access class and they don’t share the transaction, a function at the presentation layer is executing sql in more than one transactions and one of the transaction fails it will roll back that and will not affect the other transaction. We don’t want that ... we want to roll back all the transactions happens to complete the job of that presentation layer function.
I don’t know how to achieve that ...
Does my design is incorrect? Any suggestions ???
I am using SQL Server 2008 and C# and .Net 4.0