为什么在从数据库定义EDM时,向导不会导入关系? [英] Why no relationships imported by the wizard when defining an EDM from a database?

查看:52
本文介绍了为什么在从数据库定义EDM时,向导不会导入关系?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我向C#项目添加了一个新的ADO.NET实体数据模型项,请求向导从现有数据库生成模型并包含所有表。令我感到惊讶的是,尽管我的所有表都作为模型中的对象引入,但它们之间没有关系,也没有导航属性,即使这些表在SQL Server 2008数据库中定义了许多关系。我刚刚开始学习EF / EDM,但我想知道我做错了什么,我没有在EDM中定义关系?谢谢,Dave

I added a new ADO.NET Entity Data Model item to a C# project, requesting the wizard to generate the model from an existing database and included all of the tables. I was suprised that though all my tables were brought in as objects in the model, there were no relationships between them and no navigation properties even though the tables had many relationships defined in the SQL Server 2008 database. I'm just starting to learn EF/EDM but am wondering what I did wrong that I got no relationships defined in the EDM? Thanks, Dave

推荐答案

我应该使用向导从数据库创建EDM来获得关系???
SHOULD I be getting relationships using the wizard to create the EDM from the database???


这篇关于为什么在从数据库定义EDM时,向导不会导入关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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