unify two models (edmx) with visual studio 2010

左心房为你撑大大i 提交于 2019-12-08 04:34:25

问题


Hello as actually as i know you can not make relations between tow models or have in one models entities from two databases, it's a posibility two join two models both of them with existig databases behind? or there is some experience with a method like:

move entities from the designer of one of them to the other and some bcp (SQL server) magic to move data and recreation on only one database?

Thanks.


回答1:


As I know the answer is: No you can't join models targeting different databases and you can't place entities from multiple databases in single model. However you should be able to make relations among entities from multiple models targeting the same database. More in these articles: part 1, part 2.

The partial workaround for multiple databases can be views representing tables from the second database in your first model and creating relations directly in the model (by Foreign key associations with referential constraints) but I didn't try this.



来源:https://stackoverflow.com/questions/5799554/unify-two-models-edmx-with-visual-studio-2010

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