I am currently working on a n-layer architecture with the following layers
- View (ASP.net Web App)
- Manager (orchestrating Services)
- Service (Business Layer uses Unit of Work )
- Repository (Data Access)
For now the Manager is calling one or more Services to access the data, save data or do some other business. The Service is using the implemented unit of work and the repository so that a service is used within a transaction.
Now we have a Manager which need to call different Services which all together should work within a Transaction.
My opinion is that the Unit of Work call should be keeped in the Service as the Service is accessing the Database by using the Repository. If we move the Unit of Work call to the Manager it would broke the design. The Manager would need a Reference to the Repository.
Any advise how to design the access?
Thanks!