外键关系船值未显示在edmx图中 [英] Foreign key relation ship values are not showing in edmx diagram

查看:93
本文介绍了外键关系船值未显示在edmx图中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用.net framework 3.5。因为我已经添加了我的数据库表。并且已经生成了edmx图。

但是具有外键关系的列没有显示在edmx图中的相应表中。但是它显示在导航属性选项卡下。

如果我在模型浏览器中看到列可用。我不明白它为什么显示那样。

此外,当我想将一个值传递给businesslibrary中相应的列我得到的错误是对象引用未设置为对象的实例。

我没有添加任何entityframework dll到那个项目。因为我已经采用了3.5框架,并且我们已经有了system.data.entity dll 。所以我正在使用它。

所以如何将值传递给该列,我应该再dll,PLZ帮我解决这个问题.... ??

hi all,
i am using .net framework 3.5. in that i have added my database tables.and edmx diagram has been generated.
but the columns which has foreign key relationship are not showing in corresponding table in edmx diagram.but it is showing under navigation properties tab.
and if i see in model browser the columns are available.i am not getting why it is displaying like that.
moreover, when i want to pass a value to that corresponding column from businesslibrary i am getting an error that object reference is not set to an instance of an object.
i didn't add any entityframework dll to that project.because i have taken 3.5 framework and in that we already have system.data.entity dll.so i am using that.
so how can i pass values to that columns ,should i any dll again ,plz help me solve this....??

推荐答案

创建edmx图时请选中一个带有选项的框:show foreign key关系这对我有用我希望它能帮到你
while creating a edmx diagram please check a box with option :"show foreign key relationship" this works for me i hope it will help you


同时确保现有的表与同一个数据库相关联。如果您修改了连接字符串(例如,在web.config中,如果适用)或者您手动编辑了EDMX相关文件,则可能会出现问题。



在我的情况下,我使用Devart但它也可能适用于你。



我想你已经确保数据库本身已经正确定义了。 />


还有一件事,你可能会尝试创建一个新的EDMX文件,看看你是否还有问题。
Also ensure that existing table are associated with the same database. This might be an issue if you have modified the connection string (for ex. In web.config, if applicable) or if you have edited EDMX related files by hand.

In my case, I was using Devart but it might apply to you also.

I suppose that you have already ensure that the database itself is properly defined.

One more thing, you might try is to create a new EDMX file and see if you still have the problem.


这篇关于外键关系船值未显示在edmx图中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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