I am using the repository pattern with EF. In my project we are using two databases and these two databases are sitting in two different projects. For any time one project is a CoreLib (we are referring in the other). I have the following questions.
- Can I use one repository layer for the two projects?
- How can I provide the transaction safety using System.Transactions.TransactionScope? Note: I am using Microsoft's unity framework and UnitOfWork pattern.
Thanks for your reply. I have implemented the functionality to save the context changes within Transaction scope. Every time, it is throwing the following exception.
{"Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for network access in the security configuration for MSDTC using the Component Services Administrative tool."}
I think this is related to MSDTC configuration and I configured network DTC access in client and SQL server machine. The configuration is as follows.
Network DTS access - Enabled.
Allow Remote Clients - Enabled.
Allow Remote Administration – Enabled.
Allow Inbound - Enabled.
Allow outbond - Enabled.
No Authentication Required – Enabled.
Is there anything I am missing in configuring MSDTC?
One more question: Is this configuration linked to Domain configuration? Because in our environment my DB server is not resolved with its name (we are using the IP address).