1

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 exposes 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?

4

1 回答 1

0

如果您的数据库都具有相同的结构,那么您只需要一个数据模型。然后,您可以使用连接字符串指向正确的数据库。

于 2010-11-27T09:51:53.640 回答