Entity Framework Core (EF Core) continues to be the primary ORM of choice for .NET applications, and with EF Core 10 (available with .NET 10, aka .NET 2025) around the corner, you can expect many features which will enhance productivity, enable new database scenarios, and optimize performance. In a world of high-scale cloud services, modern web apps, and data-rich desktop applications, the new features will affect how you model data, optimize queries, and work across relational and NoSQL stores.
In this article, we will explore the top six features shipping in EF Core 10. For each feature, we will discuss why it is important, how it works under the hood, and include some code examples to help you quickly onboard. By the end of these articles, you should have an understanding of the new features, and be ready to upgrade your projects and take advantage of everything it has to offer in EF Core 10.
1. Named Query Filters
Named query filters allow you to define multiple, separate global filters on the same entity, then enable or disable them by name in specific queries. This resolves long-standing pain points around cross-cutting concerns, especially we often unit test with soft delete, multitenancy, or dynamic flags.
Why use this
– You can implement soft delete once without having to repeat .Where(e => !e.IsDeleted) everywhere
– You can enforce tenant boundaries by default and have the choice to exclude or combine filters
– You can keep filter logic uniquely named and centralized, enhancing readability.
How it works
You call .HasQueryFilter(name, lambda) in your OnModelCreating call. During query time, you can use the filter name in LINQ .IgnoreQueryFilters(…) or selective .IgnoreQueryFilters(new[]{ “FilterA”}). EF Core formulates all the filters into the SQL WHERE clause for you, and you only exclude what you explicitly choose.
modelBuilder.Entity<Blog>()
.HasQueryFilter(“SoftDelete”, b => !b.IsDeleted)
.HasQueryFilter(“Tenant”, b => b.TenantId == currentTenantId);
// Later in code…
var allBlogs = await context.Blogs
.IgnoreQueryFilters(“SoftDelete”)
.ToListAsync();
2. Full-Text Search for Azure Cosmos DB
Introducing full-text search support for Azure Cosmos DB in EF Core 10! You’re now able to specify searchable properties in your EF model, and compose rich, relevance-ranked text queries using LINQ.
Why would you want to do this?
– Provide fast and scalable text search over large JSON documents
– Combine full-text search capabilities with Cosmos DB’s vector search for AI-based relevance
– Avoid hand rolling REST calls or embedding raw SQL directly in your application
How it works
Decorate entity properties that you want indexed, then use the Search() method in LINQ. EF Core will convert your LINQ expression to what is necessary to use Cosmos DB’s search API, and you’ll get paginated results that handle filtering and ranking for you!
public class Article { public string Id { get; set; } public string Body { get; set; } } modelBuilder.Entity
() .HasFullTextSearch(a => a.Body); var results = await context.Articles .Where(a => a.Body.Search(“distributed caching performance”) > 0) .OrderByDescending(a => a.Body.SearchScore()) .ToListAsync();
3. Improved LINQ and SQL Translation
EF Core’s LINQ translation engine is getting smarter and smarter. EF Core 10 translates more of the .NET methods and complex query structures into server-side SQL, further minimizing client-side evaluation which improves performance.
Why use it
– Remove unwanted fallback to the client that can destroy performance for large datasets
– Build richer LINQ queries using methods like DateOnly/TimeOnly, string.Replace, and more
– Clean code, no more “raw-SQL” snippet to maintain
How it works
Behind the scenes, the query compiler examines expression trees and maps supported CLR methods to SQL functions or constructs. Any time a new overload of a method is recognized, EF Core will inject the corresponding SQL translation so that the database can do the heavy lifting.
// Before: string.Replace fell back to client eval var updatedNames = await context.Users .Where(u => u.Email.Replace(“@old.com”, “@new.com”) == newEmail) .ToListAsync(); // Now: fully translated to SQL REPLACE(u.Email, ‘@old.com’,’@new.com’)
4. ExecuteUpdateAsync Lambda Overloads
Bulk updates become more natural in EF Core 10 with overloaded ExecuteUpdateAsync methods that accept regular lambdas instead of expression trees. This opens the door to more dynamic update logic using local variables, methods, and inline computations.
Why use this
- Keep update logic inline without building complex Expression> trees
- Leverage C# methods and existing functions in your update templates
- Achieve set-based updates to avoid loading entities into memory
How it works
Pass a lambda that takes your entity and returns the updated entity instance. EF Core extracts the property assignments and converts them into a single UPDATE statement.
int daysToArchive = 30; await context.Posts.ExecuteUpdateAsync(post => post.SetProperty(p => p.Status, p => p.CreatedOn < DateTime.UtcNow.AddDays(-daysToArchive) ? “Archived” : p.Status) );
This produces SQL like:
UPDATE Posts SET Status = CASE WHEN CreatedOn < DATEADD(day, -30, GETUTCDATE()) THEN ‘Archived’ ELSE Status END
5. Source-Generated Compiled Models
Startup performance is important for serverless functions, microservices, and desktop applications. EF Core 10 brings you source-generated compiled models that meld your model’s metadata into generated code that skips the runtime model-building step entirely.
Benefits to you
– Reduce application startup time and memory usage
– No more runtime reflection and expression tree generation on first use
– Validation and drift detection with determinism ahead of time
How to use it
Add the Microsoft.EntityFrameworkCore.Design package and decorate your DbContext class with the [CompiledModel] attribute. At build time, the EF Core source generator creates a partial class including the fully built-in IModel now at runtime; EF Core will use the generated model instead of building one via reflection.
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata; [CompiledModel] public partial class BloggingContext : DbContext { // Define DbSets… }
6. JSON Column Mapping
Relational databases are not one size fits all, and EF Core 10 embraces this idea with first-class JSON column mapping. You can store nested objects, and flexible schemes in a single JSON column while still having the capability to query deeply using LINQ.
Why Use This
– Simplifies data models when working with semi-stuctured or changing payloads
– Eliminates costly schema migrations for trivial modifications to nested data
– Provides relational integrity for core fields, with the flexibility of JSON for add-ons
How It Works
Leverage the .HasJsonColumn() configuration on the entity’s property. EF Core serializes the CLR type to JSON, when saving and deserializes it on retrieval. Once in LINQ, you are able to drill down into JSON properties utilizing the new JsonValue method, which EF Core then translates to the appropriate SQL JSON functions (i.e., JSON_VALUE on SQL Server, or ->> on PostgreSQL).
public class Order { public int Id { get; set; } public Address ShippingAddress { get; set; } } modelBuilder.Entity() .Property(o => o.ShippingAddress) .HasJsonColumn(“ShippingDetails”); var ordersToNY = await context.Orders .Where(o => o.ShippingAddress.JsonValue(“City”) == “New York”) .ToListAsync();
FAQS
Q1 : What are the key performance improvements introduced in EF Core for .NET 2025?
A : EF Core for .NET 2025 brings compiled models, optimized query caching, and a reduced memory footprint to speed up startup and runtime performance.
Q2 : How do compiled models work, and how can I enable them in my project?
A : Compiled models pre-generate EF Core’s metadata and mapping code at build time, eliminating runtime reflection overhead. Enable them by installing the Microsoft.EntityFrameworkCore.ModelCompilation package and configuring your DbContext options.
Q3 : What enhancements have been made to LINQ queries in this release?
A : The update introduces smarter query translation and improved client-evaluation warnings. Common patterns like joins and groupings are now translated into more efficient SQL, reducing round-trips and data transfers.
Q4 : JSON column mapping with EF Core for .NET 2025?
A : Yes, EF Core now offers first-class support for JSON column mapping in SQL Server and PostgreSQL. You can map nested objects directly to JSON columns using the HasJsonConversion() Fluent API.
Conclusion
EF Core 10 for .NET 2025 is released. EF Core 10 represents a big step forward in terms of performance improvements, new data-modeling paradigms, and new database support for both relational and NoSQL databases. Support for named query filters, built-in full-text search for Cosmos Db, better LINQ translation, simple-to-use bulk updates, source-generated models for improved performance, and JSON column mapping lets you write cleaner code, ship faster, and handle more challenging data scenarios with confidence.
Are you ready to get started? Download the .NET 10 SDK, install the EF Core 10 preview, and start testing these features today. As always, our final EF 10 release will be influenced by any feedback we get from the real-world apps, so your feedback will help us make EF Core even better.