whatisgithub

What is crossef?

i-stream/crossef — explained in plain English

Analysis updated 2026-05-18

5C#Audience · developerComplexity · 2/5Setup · easy

In one sentence

A .NET library that lets Entity Framework Core LINQ queries join data across two different databases in a single query.

Mindmap

mindmap
  root((CrossEF))
    What it does
      Cross-database LINQ joins
      Splits query into fragments
    Tech stack
      C#
      .NET
      EF Core
    Use cases
      Join CRM and billing data
      Cross-provider joins
    Audience
      .NET developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Join customer data from a CRM database with data from a separate billing database

USE CASE 2

Combine tables across two different database providers in one LINQ query

USE CASE 3

Add cross-database joins to an app without rewriting existing DbContext classes

What is it built with?

C#.NETEntity Framework Core

How does it compare?

i-stream/crossefallquixotic/conanpatcheradrenak/scene-switcher
Stars556
LanguageC#C#C#
Last pushed2022-12-08
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity2/53/51/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires .NET 10 and EF Core 10, existing DbContext classes need no changes.

So what is it?

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.

Copy-paste prompts

Prompt 1
Show me how to install CrossEF and join two DbContexts using AsCrossQuery.
Prompt 2
Explain how CrossEF's semi-join optimization works when joining across databases.
Prompt 3
Help me convert an existing manual two-query join into a single CrossEF query.

Frequently asked questions

What is crossef?

A .NET library that lets Entity Framework Core LINQ queries join data across two different databases in a single query.

What language is crossef written in?

Mainly C#. The stack also includes C#, .NET, Entity Framework Core.

How hard is crossef to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is crossef for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.