映射在EF 4的外键,而无需创建一个新的EDMX文件 [英] Mapping foreign keys on EF 4 without creating a new Edmx file

查看:114
本文介绍了映射在EF 4的外键,而无需创建一个新的EDMX文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过取消对外国创造的entites的选项创建EDMX文件keys.So没有映射为我的外键的字段。是否有可能映射外键,而无需创建一个新的EDMX文件?如果可能的话如何?我从我already.I正在使用VS 2012 .Thanks数据库中创建的.edmx。

I created edmx file by unchecking the option for creating entites for foreign keys.So there is no mapping for my foreign key fields. Is it possible to map foreign keys without creating a new edmx file ? If possible How.? I created .edmx from a database which I had already.I am using VS 2012 .Thanks .

推荐答案

右键单击EDMX,从数据库中击中更新模型。还有的在那里外键的复选框。这就是你要找的是什么?

Right click in the edmx, hit update model from database. There's a checkbox for foreign keys in there. Is that what you're looking for?

这篇关于映射在EF 4的外键,而无需创建一个新的EDMX文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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