Join customer data from a CRM database with data from a separate billing database
Combine tables across two different database providers in one LINQ query
Add cross-database joins to an app without rewriting existing DbContext classes
| i-stream/crossef | allquixotic/conanpatcher | adrenak/scene-switcher | |
|---|---|---|---|
| Stars | 5 | 5 | 6 |
| Language | C# | C# | C# |
| Last pushed | — | 2022-12-08 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | easy | moderate | easy |
| Complexity | 2/5 | 3/5 | 1/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires .NET 10 and EF Core 10, existing DbContext classes need no changes.
CrossEF is a code library for .NET developers that solves a specific limitation in Entity Framework Core, the common way .NET applications talk to databases. Normally, Entity Framework Core refuses to run a single query that reaches into two different DbContext objects at once, which matters because a DbContext usually represents one specific database connection. That means a query that needs to join a customer table living in one database with an invoice table living in a completely different database, or even a different database provider, requires writing separate queries and combining the results by hand. CrossEF removes that restriction by acting as a small engine that splits a LINQ query into pieces that each belong to a single database, runs each piece as real, translated SQL on its own context, and then joins the results together in memory. Filters written before the join, or that only touch one side of the join, are still pushed down and run as SQL rather than being pulled into memory unnecessarily, and the library uses an efficient technique called a semi-join so it does not need to scan an entire second table when joining on a matching key. Using it is meant to feel almost the same as writing a normal Entity Framework query. Developers either mark the first part of the query with a method called AsCrossQuery, then use ordinary LINQ from there, or write a completely normal-looking query and simply end it with ToCrossListAsync. Left joins are supported too, though they fall back to pulling in full data from both sides rather than using the optimized approach. The library requires .NET 10 and Entity Framework Core 10, and works with any supported database provider, including cases where the two sides of a join use entirely different providers. It ships as a standard NuGet package, installable with a single command, and if a query only touches one database context, CrossEF steps out of the way entirely and lets Entity Framework Core handle it normally with no added overhead.
A .NET library that lets Entity Framework Core LINQ queries join data across two different databases in a single query.
Mainly C#. The stack also includes C#, .NET, Entity Framework Core.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.