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.
精彩评论