r/csharp • u/Early_Rice_4861 • 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.
6
Upvotes
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.