Linq to Entities / Entity Framework cross edmx "join"

entity-framework linq-to-entities

Question

I have two entities, each from a different database and therefore different edmx files. There is, however, an infered relationship between them.

Foo has many Bars for example.

What's the easiest way to do this join in the EntityFramework, with fewest database calls?

Thanks.

Accepted Answer

You can do this by adding cross-model navigation properties. This requires manually editing the EDMX. There is an example, including LINQ to Entities, here.


Popular Answer

You can do this by using Views to represent data in the other database. Read about cross database joins in EF



Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why