What's New in LINQ & Entity Framework Core 11?
Explore the latest LINQ join APIs and EF Core 11 query improvements with practical C# examples, result sets, and SQL translation. Learn what changed, why it matters, and where to use it.
LINQ and Entity Framework Core continue to evolve to make data queries easier to write and more efficient to execute. In .NET 11, LINQ introduces join improvements such as FullJoin() and tuple-returning overloads for Join() and GroupJoin(). EF Core 11 builds on these changes with SQL translation improvements, including support for translating FullJoin() to SQL and optimizations that can remove unnecessary joins, ordering, or casts.
This guide focuses only on the new LINQ and EF Core 11 changes—not a general LINQ or EF Core introduction.
LeftJoin() and RightJoin() were introduced in .NET 10. They are included only for comparison. The new LINQ features covered here are the .NET 11 FullJoin(), tuple-returning join overloads, and related comparer support.- LINQ FullJoin
- Tuple-returning Join
- Tuple-returning GroupJoin
- Custom equality comparers
- Enumerable, Queryable & AsyncEnumerable
- EF Core FullJoin translation
- Better SQL for to-one joins
- GroupBy enhancements
- Removing no-op CASTs
- MinBy & MaxBy translation
- Complex types with TPT/TPC
- Ordered string aggregation in SQLite
- Other EF Core 11 changes
1. LINQ FullJoin() — Full Outer Join in LINQ
A full outer join returns all records from both sequences. Where keys match, the records are paired. If a record on either side has no match, it still appears in the result with the other side set to its default value (typically null for reference types).
Example scenario
Imagine we have customers and orders. Some customers have orders, some have none, and an order may have a missing or unmatched customer record. We want to see every customer and every order in a single result.
Sample data
var customers = new[]
{
new Customer(1, "Aarav"),
new Customer(2, "Mira"),
new Customer(3, "Kabir")
};
var orders = new[]
{
new Order(101, 1, "Laptop"),
new Order(102, 1, "Mouse"),
new Order(103, 4, "Keyboard") // CustomerId 4 doesn't exist
};Before .NET 11: workaround using LeftJoin + Union
Before the built-in full join, developers commonly composed a left join with a second query to find unmatched right-side records, then combined the results. This was more verbose and required careful handling of null/default values and duplicate semantics.
// Left-side records, including unmatched customers
var leftSide = customers
.LeftJoin(orders,
c => c.Id,
o => o.CustomerId,
(c, o) => new { Customer = c, Order = o });
// Right-side records whose customer key has no match
var unmatchedOrders = orders
.Where(o => !customers.Any(c => c.Id == o.CustomerId))
.Select(o => new { Customer = (Customer?)null, Order = o });
var fullOuterJoin = leftSide.Concat(unmatchedOrders);This demonstrates the general pattern, not a universal replacement: depending on the source type/provider, nullability, equality rules, and duplicate behavior, the workaround may need adjustment.
In .NET 11: use FullJoin()
var result = customers.FullJoin(
orders,
customer => customer.Id,
order => order.CustomerId);
foreach (var (customer, order) in result)
{
Console.WriteLine(
$"Customer: {customer?.Name ?? "(no customer)"}, " +
$"Order: {order?.Product ?? "(no order)"}");
}Expected output (illustrative)
Because the new overload returns a tuple, we can deconstruct it directly in the foreach loop. A full join preserves unmatched customers Mira and Kabir and the unmatched Keyboard order. Row order is not guaranteed unless you add an explicit ordering to the query; this output is illustrative.
2. Tuple-returning Join()
LINQ's existing Join() required a result selector to shape each matching pair. .NET 11 adds an overload that returns the matched pair as a tuple, so you can use the pair directly or deconstruct it.
Before .NET 11
var joined = products.Join(
orders,
product => product.Id,
order => order.ProductId,
(product, order) => new { product, order });
foreach (var item in joined)
{
Console.WriteLine($"{item.product.Name}: qty={item.order.Quantity}");
}In .NET 11
var joined = products.Join(
orders,
product => product.Id,
order => order.ProductId);
foreach (var (product, order) in joined)
{
Console.WriteLine($"{product.Name}: qty={order.Quantity}");
}Example output
Instead of creating an anonymous object in the result selector, the overload returns the matching elements together in a tuple. Tuple names in the returned result are inferred from the source parameters, and deconstruction makes the pair convenient to consume.
3. Tuple-returning GroupJoin()
GroupJoin() produces a result for each element in the outer sequence along with a sequence of matching elements from the inner sequence. The .NET 11 overload returns that pair as a tuple, removing the need to write a result selector when you want to keep both pieces.
Before .NET 11
var grouped = departments.GroupJoin(
employees,
department => department.Id,
employee => employee.DepartmentId,
(department, matchingEmployees) =>
new { department, matchingEmployees });In .NET 11
var grouped = departments.GroupJoin(
employees,
department => department.Id,
employee => employee.DepartmentId);
foreach (var (department, matchingEmployees) in grouped)
{
Console.WriteLine($"Department: {department.Name}");
foreach (var employee in matchingEmployees)
Console.WriteLine($" - {employee.Name}");
}Example output
Each department appears, even if its matching employee sequence is empty. This makes GroupJoin() useful for grouped reporting and parent-child relationships.
4. Custom equality comparer support
Join operations usually compare keys using their default equality behavior. .NET 11 adds comparer overloads to the new outer join operators and tuple-returning Join()/GroupJoin() overloads. You can provide an IEqualityComparer<TKey> when the default equality rule is not what your query needs.
Case-insensitive matching example
Suppose product category keys contain inconsistent casing, such as "hardware" and "Hardware". A case-insensitive comparer can treat those keys as equal.
var products = new[]
{
new Product(1, "Laptop", "Hardware"),
new Product(2, "Desk", "Furniture")
};
var categories = new[]
{
new Category("hardware", "Devices and components"),
new Category("FURNITURE", "Office furniture")
};
var matches = products.Join(
categories,
product => product.Category,
category => category.Name,
StringComparer.OrdinalIgnoreCase);
foreach (var (product, category) in matches)
Console.WriteLine($"{product.Name} => {category.Description}");Output
In .NET 11, EqualityComparer<T>.Create() also provides a factory for creating an equality comparer from a key selector. For example, you can create a comparer that compares people by normalized email or records by a chosen property instead of comparing the entire object.
// Build an equality comparer based on a selected key property.
var emailComparer = EqualityComparer<User>.Create(
user => user.Email,
StringComparer.OrdinalIgnoreCase);
var uniqueUsers = new HashSet<User>(emailComparer)
{
new User("alex@example.com"),
new User("ALEX@example.com"), // Duplicate by email
new User("sam@example.com")
};
Console.WriteLine(uniqueUsers.Count); // 25. Enumerable vs Queryable vs AsyncEnumerable
The new join APIs are available across Enumerable, Queryable, and AsyncEnumerable. Their execution model is still different—choosing the correct one matters.
| API | Works with | Typical execution | Common use |
|---|---|---|---|
Enumerable | IEnumerable<T> | Runs LINQ operations over in-memory objects; deferred until enumeration for most query operators. | Lists, arrays, in-memory collections. |
Queryable | IQueryable<T> | Builds an expression tree. A provider (such as EF Core) interprets it—often translating it into SQL. | Database queries. |
AsyncEnumerable | IAsyncEnumerable<T> | Enumerates asynchronously with await foreach; useful for asynchronous streams. | Async streams, streaming data, supported async LINQ pipelines. |
Enumerable example
var joined = customerList.FullJoin(
orderList,
customer => customer.Id,
order => order.CustomerId);
foreach (var pair in joined)
{
// Query executes over in-memory data as it is enumerated.
}Queryable example with EF Core
var query = db.Customers.FullJoin(
db.Orders,
customer => customer.Id,
order => order.CustomerId);
var rows = await query.ToListAsync();Here, the EF Core provider processes the query expression and translates supported parts to SQL. Calling ToListAsync() executes the database query and materializes its results.
AsyncEnumerable example
// When using the async LINQ APIs on IAsyncEnumerable sequences:
await foreach (var (left, right) in asyncSequence)
{
// Consume each result asynchronously.
}IQueryable does not mean SQL by itself—it needs a query provider.6. EF Core 11: FullJoin translated to SQL FULL JOIN
EF Core 11 translates the new LINQ FullJoin() operator to SQL FULL JOIN for supported relational providers. For the EF Core example, use the documented result-selector overload to shape the pair explicitly.
var results = await context.Customers
.FullJoin(
context.Orders,
customer => customer.Id,
order => order.CustomerId,
(customer, order) => new { Customer = customer, Order = order })
.ToListAsync();SQL generated (simplified)
SELECT c.Id, c.Name, o.Id, o.CustomerId, o.OrderDate
FROM Customers AS c
FULL JOIN Orders AS o
ON c.Id = o.CustomerId;The database returns matching pairs, customers without orders, and orders without matching customers. The tuple-returning LINQ overload is convenient in general LINQ use, but do not assume every overload or custom comparer shape is translated by every EF Core provider. SQL shown is simplified for readability; exact SQL varies by provider and query shape.
ToList() before the join if you want EF Core to perform the operation in SQL.7. Better SQL for to-one joins
EF Core 11 can prune unnecessary joins when querying reference (to-one) navigations. In split-query scenarios, EF previously could include joins to reference navigation tables even when they weren't required for the split collection query. EF Core 11 removes such redundant joins in supported query shapes.
Example query
var blogs = await context.Blogs
.Include(blog => blog.BlogType)
.Include(blog => blog.Posts)
.AsSplitQuery()
.ToListAsync();In earlier SQL, the split query for posts could contain an unnecessary join to the blog type table. In EF Core 11, that join is pruned from the query when it isn't needed, reducing the work the database must do.
8. GroupBy translation enhancements
EF Core 11 improves translation and materialization for supported GroupBy() shapes. Examples include navigation access and joins over a per-group top result, aggregate expressions over reference navigations translated using joins before grouping, and left-joined non-entity projections correctly materialized through joins and grouping. This is a translation improvement—not a promise that all arbitrary grouped LINQ expressions will execute on the server.
Example: highest-rated post per blog
var query = context.Posts
.GroupBy(post => post.BlogId)
.Select(group => group
.OrderByDescending(post => post.Rating)
.First());
var topPosts = await query.ToListAsync();EF Core's newer translation capabilities can handle more compositions of grouping, joins, and navigation access. Not every arbitrary LINQ grouping expression is guaranteed to translate—translation depends on the supported pattern and provider.
9. Removing redundant CAST expressions
EF Core sometimes produced a SQL cast where a column was converted to the type it already had. Such no-op casts add noise and, in some cases, can interfere with index usage. EF Core 11's SQL post-processing removes recognized no-op casts.
Before
SELECT u.Id, u.Name
FROM Users AS u
WHERE CAST(u.Name AS nvarchar(max)) LIKE N'Name%';EF Core 11
SELECT u.Id, u.Name
FROM Users AS u
WHERE u.Name LIKE N'Name%';With the unnecessary conversion removed, the predicate can be more index-friendly when an appropriate index exists and the rest of the query/database conditions allow it.
10. MinBy() and MaxBy() translation
Min() and Max() return a scalar value. MinBy() and MaxBy() return the element associated with the minimum or maximum value selected by a key. EF Core 11 adds SQL translation for these LINQ operators, including their asynchronous counterparts.
Example: Find the blog with the most posts
var blogWithMostPosts = await context.Blogs
.MaxByAsync(blog => blog.Posts.Count());This asks for the entity with the greatest post count, rather than returning just the count. EF Core translates supported query forms to SQL. Tie behavior and generated SQL may depend on the provider and query shape; add a secondary ordering when deterministic tie-breaking is required.
MinBy example
var oldestBlog = await context.Blogs
.MinByAsync(blog => blog.CreatedOn);Use these when you need the row/entity corresponding to a key extremum. If you only need the minimum or maximum scalar value, Min() or Max() may express that more directly.
11. Complex types with TPT and TPC inheritance
EF Core 11 expands support for complex types when used with the TPT (Table-per-Type) and TPC (Table-per-Concrete-Type) inheritance mapping strategies, including scenarios involving JSON-mapped complex data. This can make it possible to model reusable value-like structures alongside these inheritance patterns.
Illustrative model
[ComplexType]
public class Address
{
public string City { get; set; } = "";
public string Country { get; set; } = "";
}
public abstract class Person
{
public int Id { get; set; }
public Address Address { get; set; } = new();
}
public class Employee : Person
{
public string JobTitle { get; set; } = "";
}
public class Contractor : Person
{
public string ContractCompany { get; set; } = "";
}Configure TPT inheritance
modelBuilder.Entity<Person>()
.ToTable("People");
modelBuilder.Entity<Employee>()
.ToTable("Employees");
modelBuilder.Entity<Contractor>()
.ToTable("Contractors");EF Core 11 expands complex-type and JSON-column support for entities using TPT and TPC inheritance. Configure the inheritance strategy and complex property mapping explicitly, then validate generated migrations and queries against the provider you use.
12. Ordered string aggregation in SQLite
For SQLite, EF Core 11 adds support for ordered values in string aggregation translations using string.Join() or string.Concat() over grouped data. This lets the order of concatenated values be expressed within the aggregate query in supported cases.
Example
var blogs = await context.Blogs
.Select(blog => new
{
blog.Name,
Titles = string.Join(
", ",
blog.Posts
.OrderByDescending(post => post.Id)
.Select(post => post.Title))
})
.ToListAsync();On SQLite, this can translate to an ordered group_concat expression. Translation is provider-specific; this exact translation is a SQLite feature. Ordered aggregation requires SQLite 3.44.0 or later.
13. Other EF Core 11 changes worth knowing
- Date/time translations: Additional SQL Server translations for
DateTimeOffsetproperties and offset components, and support forEF.Functions.DateTrunc()across relevant date/time types. - JSON and complex type mapping: Expanded support in inheritance scenarios, including TPT/TPC complex types.
- Migration tooling: New workflow/tooling options for applying migrations and managing EF CLI configuration.
- SQL Server JSON path:
EF.Functions.JsonPathExists()translates toJSON_PATH_EXISTSon SQL Server 2022+. - SQL Server JSON collections: For SQL Server 2025 compatibility level 170, eligible primitive JSON collection
Contains()queries can translate toJSON_CONTAINS; provider and nullability conditions apply. - SQL Server vector and hybrid search: EF Core 11 supports vector indexes/search and examples combining vector search with full-text ranking; SQL Server vector APIs are experimental/provider-specific.
- SQL Server compatibility default: EF Core 11's SQL Server provider defaults to compatibility level 160 (SQL Server 2022). Older SQL Server deployments may need an explicit compatibility-level setting.
Example: JSON path exists (SQL Server 2022+)
var blogs = await context.Blogs
.Where(blog => EF.Functions.JsonPathExists(
blog.JsonData, "$.OptionalInt"))
.ToListAsync();This checks whether the specified JSON path exists in the document. SQL Server translation requires a version supporting JSON_PATH_EXISTS (SQL Server 2022 or later).
Vector properties are not selected by default
EF Core 11 avoids loading vector columns when materializing entities, reducing unnecessary data transfer for large embeddings. If you need the vector values, explicitly project them:
var embeddings = await context.Blogs
.Select(blog => new { blog.Id, blog.Embedding })
.ToListAsync();Vector properties can still participate in supported filters and ordering, including vector-distance and vector-search scenarios.
14. Which changes matter most in real projects?
| Feature | Developer benefit | Where it helps |
|---|---|---|
FullJoin() | Less custom join plumbing; easier reconciliation queries | Reports, data audits, comparing datasets |
| Tuple-returning joins | Less result-selector boilerplate | Readable LINQ pipelines |
| Comparer overloads | Custom key equality in supported LINQ joins | Case-insensitive or normalized-key matching |
| SQL join pruning | Reduced unnecessary query work | Includes, split queries, reference navigation |
| GroupBy translation | More complex grouping/query compositions translated | Reporting, per-group top rows |
| No-op CAST removal | Cleaner predicates and potentially better index use | Filtered queries, converted properties |
MinBy()/MaxBy() | Retrieve the entity at the key extremum | Oldest/newest, highest/lowest entity by metric |
Summary
.NET 11 makes LINQ joins more expressive with FullJoin() and tuple-returning overloads for Join() and GroupJoin(). EF Core 11 connects these capabilities to database queries and improves translation in a range of scenarios, including full joins, grouping, redundant join removal, no-op cast cleanup, MinBy()/MaxBy(), JSON path queries, vector search, and SQL Server JSON collection translation.
The key takeaway: write clear LINQ first, understand whether it runs in memory or is translated by a provider, inspect the SQL for database-backed queries, and benchmark important paths with your real data.
Learn • Build • Grow Together