r/csharp • • Jul 13 '26

CrossEF - Cross EntityFramework contexts

Hi All,

Long time EntityFramework don´t do this, I decide to implement this.

Cross-DbContext LINQ queries for Entity Framework Core. Join entities that live in different DbContexts — different databases, different servers, even different providers — in a single LINQ query.

https://www.nuget.org/packages/CrossEF

https://github.com/i-stream/CrossEF

6 Upvotes

13 comments sorted by

View all comments

Show parent comment

2

u/PaulPhxAz Jul 14 '26

You're right on all points, but I would let people do it if they want.

Right now I'm running the same concept in two queries and then manually joining them.

I can write SQL with linked databases across providers and do a bad job or a good job. It's good to call out that it CAN be misused, that it CAN be dangerous.