DEV Community

Yass- Cloud and AI Explorer
Yass- Cloud and AI Explorer

Posted on

EF Core 11 and ASP.NET Core 11 Changes That Will Bite You in Production (.NET 11)

With .NET 11 Release Candidate 2 out with a go-live license ahead of the November 2026 GA launch, many teams are preparing to bump their target frameworks from net10.0 to net11.0.

While C# 15 gets most of the spotlight (see our What's New in C# 15 Full Feature Guide), the runtime and framework updates inside EF Core 11 and ASP.NET Core 11 contain major new capabilities—along with several subtle breaking changes that can silently break production workloads.

Here is a quick breakdown of the biggest changes you need to know before upgrading.

👉 Read the complete EF Core 11 & ASP.NET Core 11 Guide (with Comparison Tables & 11-Step Upgrade Checklist) on Iwalen


1. SqlVector<T> Columns Now Return null by Default (EF Core 11)

The Problem in EF Core 10: Vector properties were loaded on every entity query just like strings or ints. Because embeddings carry hundreds or thousands of float values (e.g., 1,536 dimensions), routine entity queries dragged massive payloads across the wire even when you never read the vector in C#.

What Changed in EF Core 11: SqlVector<T> properties are now omitted from default entity SELECT statements, leaving the property null on materialized entities. (In the EF team's benchmarks, this made standard queries 9x faster locally and 22x faster against remote Azure SQL).

// Entity property (SQL Server 2025+):
[Column(TypeName = "vector(1536)")]
public SqlVector<float> Embedding { get; set; }

var docs = await db.Documents.OrderBy(d => d.Title).ToListAsync();
// EF Core 10: docs[0].Embedding contained the 1536-float vector
// EF Core 11: docs[0].Embedding is null (column omitted from SELECT)

// Need the vector values in C#? Project the column explicitly:
var vectors = await db.Documents
    .Select(d => new { d.Id, d.Embedding })
    .ToListAsync();
Enter fullscreen mode Exit fullscreen mode

Gotcha: Because SqlVector<T> is often declared without ?, the compiler won't warn you. Grep your codebase for reads of .Embedding and convert them to explicit .Select(...) projections!


2. Complex Types Now Support JSON, TPT, TPC, and Direct Indexing (EF Core 11)

In EF Core 10, complex types and JSON columns couldn't be used on entities mapped with Table-per-Type (TPT) or Table-per-Concrete-Type (TPC) inheritance, and configuring nested properties required hopping through ComplexProperty(...).

In EF Core 11:

  • You can combine UseTptMappingStrategy() or UseTpcMappingStrategy() with complex types and .ToJson().
  • You can configure and index nested properties directly via lambda chaining:
// EF Core 11: chain member access directly inside Property()
modelBuilder.Entity<Customer>()
    .Property(c => c.Address.PostalCode)
    .HasMaxLength(12);

// Index a field inside a complex type directly:
modelBuilder.Entity<Customer>().HasIndex(c => c.Address.PostalCode);

// Relational + JSON: index a path inside a complex collection
modelBuilder.Entity<Order>().ComplexCollection(o => o.Items, b => b.ToJson());
modelBuilder.Entity<Order>().HasIndex("Items[].Sku");
Enter fullscreen mode Exit fullscreen mode

3. Microsoft.Data.SqlClient 7.0 Splits Out Entra ID Authentication

EF Core 11 upgrades to Microsoft.Data.SqlClient 7.0, which removes the transitive Azure and Entra ID authentication dependencies (Azure.Identity, Microsoft.Identity.Client) from the core package.

If your production connection string uses ActiveDirectoryDefault, ActiveDirectoryManagedIdentity, or ActiveDirectoryServicePrincipal, your app will fail at runtime unless you explicitly install the new extension package:

<PackageReference Include="Microsoft.Data.SqlClient.Extensions.Azure" Version="7.0.0" />
Enter fullscreen mode Exit fullscreen mode

(Note: Local development against a Docker SQL container with password auth won't catch this—test Managed Identity in staging!)


4. Cosmos DB Drops Unmapped JSON Properties on Save (High Impact!)

Because EF Core 11 switched the Cosmos DB provider from Newtonsoft.Json to System.Text.Json, the hidden __jObject shadow property is gone.

Previously, unmapped JSON properties in a Cosmos document were preserved in __jObject and written back on SaveChangesAsync(). In EF Core 11, unmapped properties are ignored on read and permanently lost when the entity is saved. Additionally, synchronous Cosmos I/O (ToList(), SaveChanges(), EnsureCreated()) now throws unconditionally with no opt-in switch.


5. End-to-End Async Validation & Localization in Minimal APIs (ASP.NET Core 11)

[ValidatableType] and [SkipValidation] have graduated from experimental status (no more ASP0029 warning suppressions!), and AddValidation() now supports asynchronous validators via AsyncValidationAttribute and IAsyncValidatableObject alongside automatic resource localization:

builder.Services.AddLocalization(); // Registers IStringLocalizerFactory
builder.Services.AddValidation();   // .NET 11 wires up localization automatically
builder.Services.AddScoped<IUserDirectory, SqlUserDirectory>();

var app = builder.Build();

app.MapPost("/signup", (SignupRequest request) =>
    TypedResults.Created($"/users/{request.Username}", request));

app.Run();
Enter fullscreen mode Exit fullscreen mode

Cross-Assembly Trap: The validation source generator only discovers types in the assembly where AddValidation() is called. If your Minimal API endpoints live in a separate class library, expose an extension method in that assembly that calls services.AddValidation().


6. ConcurrencyLimiter Removed & OpenAPI Defaults to v3.2

Two major ASP.NET Core 11 shifts to audit before upgrading:

  1. ConcurrencyLimiter Middleware Removed: UseConcurrencyLimiter(), AddQueuePolicy(), and AddStackPolicy() are gone in net11.0. Migrate to the built-in rate-limiting middleware (AddRateLimiter -> AddConcurrencyLimiter).
  2. OpenAPI 3.2 by Default: OpenApiOptions.OpenApiVersion now defaults to OpenApiSpecVersion.OpenApi3_2 (powered by Microsoft.OpenApi 3.x), preserves multiple ProducesResponseType declarations per status code using anyOf, and supports binary file response schemas (FileContentResult).

7. Built-In OpenTelemetry HTTP Tags Out of the Box

In .NET 10, SuppressActivityOpenTelemetryData defaulted to true. In ASP.NET Core 11, it defaults to false, meaning the framework emits standard OpenTelemetry HTTP server-span tags (http.request.method, http.response.status_code, http.route, etc.) automatically without needing OpenTelemetry.Instrumentation.AspNetCore. Make sure to upgrade your instrumentation package if you use one so you don't get duplicate tags!


Read the Full Deep-Dive & 11-Step Upgrade Checklist

This post only scratches the surface. In the full technical guide, we cover:

  • Full comparison matrix: .NET 10 vs. .NET 11 across EF Core & ASP.NET Core
  • SQL Cleanups: Stripping no-op CASTs, split-query join pruning, and SQL Server compatibility level 160 / 170 (JSON_PATH_EXISTS, JSON_CONTAINS, FullJoin)
  • Blazor in .NET 11: <DisplayName>, QuickGrid URL pagination & OnRowClick, and automatic header-based CSRF protection
  • Step-by-step .NET 11 Production Upgrade Checklist

👉 Read the Full Guide: What's New in EF Core 11 and ASP.NET Core 11 (.NET 11)

More from our .NET 11 & C# 15 Series:

Top comments (0)