使用visual studio 2010统一两个模型(edmx)

编程入门 行业动态 更新时间:2024-10-19 16:33:21
本文介绍了使用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)

本文发布于:2023-11-12 20:17:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582434.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模型   两个   studio   visual   edmx

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!