문제

I'm working with entity-framework and MVC and i have two databases in the same server.

I just want to do a select in a table in the "database1" then do another select in a table in the "database2" in the same code but i don't know how to configure two diferent databases in my project.

Can someone show me how to configure it to do this? and how to use it in the code?

도움이 되었습니까?

해결책

You have to setup your connection in your database initilizer. In EF6 you have a good support for multiple databases.

Check this link: Using entity framework on multiple databases

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top