Save and update in two databases?

The project uses EF6. Now, at a later stage, you need to use tables from another database.

DAL is implemented using Generic Repository

andUnit of Work

I am wondering if there is a way in the DbContext to refer to two separate databases? Also how EF will know which object belongs to that database.

+3


source to share


1 answer


I believe it is not possible to use EF this way.



Instead, create a view that references a table in another database and map that view.

+1


source







All Articles