使用visual studio 2010统一两个模型(edmx) [英] unify two models (edmx) with visual studio 2010

查看:183
本文介绍了使用visual studio 2010统一两个模型(edmx)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,实际上我知道你不能在两个模型之间建立关系,或者在两个数据库中的一个模型实体中,它是一个可能性两个连接两个模型,两者都与existsig数据库在一起?或者有一些方法的经验,例如:

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:

将实体从其中一个的设计器移动到另一个,一些bcp(SQL Server)魔术来移动数据和娱乐只有一个数据库?

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?

谢谢。

推荐答案

答案是:不,您不能加入定位到不同数据库的模型,并且您不能将单个模型中的多个数据库的实体放置。但是,您应该能够将来自多个模型的实体之间的关系定位到同一数据库。这些文章中的更多内容:第1部分第2部分

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.

这篇关于使用visual studio 2010统一两个模型(edmx)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆