映射在EF 4的外键,而无需创建一个新的EDMX文件创建一个、文件、EF、EDMX

由网友(春风十里不如操你)分享简介:我通过取消对外国创造的entites的选项创建EDMX文件keys.So没有映射为我的外键的字段。是否有可能映射外键,而无需创建一个新的EDMX文件?如果可能的话如何?我从我already.I正在使用VS 2012 .Thanks数据库中创建的.edmx。I created edmx file by unchecki...

我通过取消对外国创造的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?

阅读全文

相关推荐

最新文章