Entity Framework Core 10 ships alongside .NET 10 as a long-term support release. Here are the new features that simplify everyday code the most.
LeftJoin and RightJoin
A left join in LINQ used to require an unreadable combination of GroupJoin, SelectMany and DefaultIfEmpty. Now there is a dedicated operator:
var rows = await db.Customers
.LeftJoin(db.Orders,
c => c.Id,
o => o.CustomerId,
(c, o) => new { c.Name, Total = o == null ? 0 : o.Total })
.ToListAsync();
Named query filters
Global filters (for example "only non-deleted rows" or "only the current tenant") can now be more than one per entity and have a name, so you can disable just one of them:
modelBuilder.Entity<Document>()
.HasQueryFilter("NotDeleted", d => !d.IsDeleted)
.HasQueryFilter("Tenant", d => d.TenantId == _tenantId);
// recycle bin: include deleted rows, but still only for the current tenant
var bin = await db.Documents
.IgnoreQueryFilters(["NotDeleted"])
.Where(d => d.IsDeleted)
.ToListAsync();
Vector search
With SQL Server 2025 and Azure SQL, EF Core 10 supports the vector type and the distance function: you can store embeddings generated by an AI model and find the most similar documents directly with LINQ, without a separate database. It is the foundation for semantic search and for systems that enrich a language model's answers with company documents.
Other improvements
- Support for the native JSON type of recent SQL Server versions.
- More flexible complex types, including optional ones and ones mapped to JSON columns.
ExecuteUpdateAsyncis easier to compose with conditional logic.
Comments (0)
No comments yet.