Switching Entity Data Model
I am using Entity framework for my DAL (Data Access Layer). We have three different instance of DB (DEV,QA,PROD). The DAL is part of a DLL which expos开发者_开发技巧es the DA as API for the business layer. I would like to know the best practices in configuring these EDMs so that we can switch the EDMs during packaging the application. And also provide a way to point to other EDM if needed.
I tried adding all the EDMs in the same library but then there is multiple declarations of all the entity classes. How do you do, these and that practices do you follow?
If your databases all have the same structure then you just need a single data model. You can then use the connection string to point at the correct database.
精彩评论