Reputation: 5915
In a project EF6 is used. Now on a later stage there is requirement to use tables from an another database.
DAL is implemented using Generic Repository
and Unit of Work
I'm wondering is there a way in DbContext to refer two separate databases? Also how EF will know which entity belongs to which database.
Upvotes: 3
Views: 62
Reputation: 100308
I believe it's not possible to use EF in such way.
Instead create a view referencing a table in another database and map that view.
Upvotes: 1