문제

I used ASP.NET MVC, Entity Framework Model First and Firebird database. Now we added Oracle database with same tables and fields and I want switch connection between Firebird and Oracle in runtime.

It is possible to use one data model for both databases ? Or, maybe, i need to create separate data models, but how I can used them ?

도움이 되었습니까?

해결책

Yes it is possible.

If you create an EDMX for each DB with the exact same CSDL section and generate classes for only one of them, then you can create a context that connects to the DB you want by specifying the correct connection string (which includes the correct EDMX elements (SSDL, CSDL, MSL)).

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