How To : Entity framework and multiple schemas

柔情痞子 提交于 2019-12-13 13:13:59

问题


I am working with Entity framework. I am using a single database with multiple schemas as, mySchema1.Employee
mySchema2.Employee
mySchema3.Employee

When I generate edmx for this database, it renames the tables as Employee1, Employee2, Employee3 etc.

How to achieve multiple schemas implementation with single edmx.

Edit: The objects should be called by same name here as Employee. Only the variable part is schema. ctx.Employee - should fetch data from a specific schema. I am looking for something where I can specify which to be used.

Please help.


回答1:


I'm not sure whether I understand the question... Do you want to have multiple diagrams per model ?

This feature is added in Entity Framework 5 which was recently released. Make sure you're using the latest version.



来源:https://stackoverflow.com/questions/12052136/how-to-entity-framework-and-multiple-schemas

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!