
What's New in EF Core 10 Query Translation: LeftJoin Support and Collection Parameter Overhaul
In an ORM that bridges relational databases and object models, query translation is a core area that determines performance and code readability. EF Core 10, released with .NET 10, cleans up complex LINQ patterns that have long plagued developers and refines default translation methods to optimize actual database execution plans.
The most notable changes are the simplification of external join syntax and a shift in the collection parameter translation strategy. This is joined by vector search support for SQL Server 2025 and increased flexibility in bulk update methods. Here is a look at what has changed and what you should check in your real-world projects.
Goodbye to 20-Year-Old GroupJoin Workarounds: The Introduction of LeftJoin
In traditional LINQ, expressing external joins—which retrieve data even when there is no match between two tables—was notoriously tricky. While it is a simple one-line LEFT JOIN in SQL, in C# code, it required combining three methods—GroupJoin, SelectMany, and DefaultIfEmpty—in a specific order. This not only made the code verbose but also made it difficult for beginners to grasp the intent intuitively.
.NET 10 LINQ and EF Core 10 now support native LeftJoin and RightJoin operators as standard APIs. You can now declare external joins cleanly with a single method call, without needing complex method chaining.
Here is an example of writing a LeftJoin in an EF Core 10 environment.
The SQL generated by the transformation is translated into the same clean LEFT JOIN syntax as the previous complex workarounds. Rather than a performance gain, this change is a dramatic improvement for code readability and maintainability.
Switching Default Translation for Collection Parameters
The Contains query, used for filtering items within a list, was often difficult for database engines to optimize. In previous versions, there were many attempts to handle parameterized collections by passing them as single JSON arrays or using database-specific functions. However, this often caused the optimizer to struggle with predicting actual row counts, leading to inefficient execution plans.
EF Core 10 has switched the default mode for translating collection parameters to a multi-scalar parameter approach. Now, queries like Where(b => ids.Contains(b.Id)) are passed as multiple separate SQL query parameters. This allows the database optimizer to perform accurate cardinality estimation, leading to more stable performance when querying large datasets. If you have specific requirements that necessitate JSON-based translation or constant inlining, you can still specify the previous behavior via global options or query-level methods.
Bulk Update Flexibility and Latest Feature Extensions
Practical improvements have also been applied to the ExecuteUpdateAsync API, which updates database records directly without loading them into memory individually. Previously, only expression trees were allowed, making it cumbersome to handle conditional property modifications or dynamic update queries, which required manually assembling expressions. In this version, it has been extended to accept regular action lambdas, making it much more flexible to write dynamic update logic.
In line with the development trends for AI applications, vector search capabilities in SQL Server 2025 and Azure SQL are now officially supported. You can invoke meaning-based similarity searches as standard queries within LINQ, using vector distance calculation functions and dedicated types.
Points to Consider Before Adopting
EF Core 10 requires the .NET 10 runtime and SDK. Since you cannot directly upgrade the package in projects running on older runtimes, you must coordinate the entire runtime upgrade schedule. There is also a change requiring you to explicitly specify the target framework flag when running migration tools in projects with multi-targeting.
With the default collection parameter mode changing to a multi-scalar approach, passing thousands of keys to Contains might hit parameter count limits or cause an explosion in query cache entries. It is recommended to review your project's data characteristics to determine whether to maintain the default mode or apply alternative configurations for areas involving large-scale queries.
