开发者

Entity Framework create a logical relationship

I'm mapping a database, which has no physical relation开发者_如何学JAVAships whatsoever. But tables are related. (they use SP to do their relationships).

Is there a way I can logically create the relationship on the data model I generated? I'd love if eager loading works with this also (even tho no physical relationship exists).


You can add the relationships manually in the model.

One way to do this is to open the edmx file using an xml editor and edit it directly.

If you create a test database with a few related tables and then generate a model from that database, you can see how relationships are defined in an edmx file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜