Taking a hands-on EF Core 11 and ASP.NET Core 11 practice test is the fastest way to catch the subtle runtime changes in .NET 11 before they catch you in staging or production. Upgrading a target framework looks simple on paper, until SqlVector<T> properties silently come back null, Cosmos DB drops unmapped JSON fields on save, Managed Identity logins fail after bumping to SqlClient 7.0, or cross-assembly Minimal API validation quietly stops rejecting invalid payloads.
![]() |
| Test your knowledge on EF Core 11 breaking changes, ASP.NET Core 11 features, and .NET 11 architecture with 20 real-world practice questions. |
In this free 20-question .NET 11 practice test, you'll troubleshoot real C#, SQL, and Razor scenarios grounded directly in the official Microsoft Learn release notes and breaking-change docs. Need a full feature walkthrough before you start? Read our companion architecture guide first: What's New in EF Core 11 and ASP.NET Core 11 (.NET 11).
EF Core 11 & ASP.NET Core 11 Practice Questions
Q1: SqlVector<T> Columns Returning Null on Materialized Entities
Your RAG service re-ranks documents in C# after a first-pass database lookup. Right after upgrading to EF Core 11 on SQL Server 2025, the re-ranker starts throwing because doc.Embedding is null:
public class Document
{
public int Id { get; set; }
public required string Title { get; set; }
[Column(TypeName = "vector(1536)")]
public SqlVector<float> Embedding { get; set; }
}
var doc = await db.Documents.FirstAsync(d => d.Id == id);
var score = Reranker.Score(doc.Embedding, queryVector); // Embedding is null in EF Core 11!
What is the correct fix in EF Core 11?
• Option B is correct: In EF Core 11,
SqlVector<T> properties are excluded from default entity materialization so routine queries don't drag thousands of float values across the network (yielding ~9x faster local queries and ~22x faster remote Azure SQL queries in EF team benchmarks). Vector columns still work inside WHERE and ORDER BY (such as VectorDistance and VectorSearch), but reading the floats in C# requires an explicit .Select(...) projection.• Option A is incorrect: EF Core does not lazy-load scalar columns.
• Option C is incorrect:
Include() is strictly for navigation properties, not scalar vector columns.• Option D is incorrect: Nullability annotations do not change EF Core 11's default column-exclusion rule for
SqlVector<T>.
Q2: Microsoft.Data.SqlClient 7.0 & Managed Identity Authentication
After upgrading an order API to EF Core 11, everything passes locally against a Docker SQL Server container using SQL password auth. In Azure staging, however, startup fails immediately when connecting with this connection string:
"Server=tcp:contoso-sql.database.windows.net;Database=Orders;Authentication=Active Directory Managed Identity;"
No C# code changed during the upgrade. What is the fix?
• Option C is correct: EF Core 11 upgrades to
Microsoft.Data.SqlClient 7.0, which removes transitive dependencies on Azure.Core, Azure.Identity, and Microsoft.Identity.Client from the core driver. Any app using ActiveDirectoryDefault, ActiveDirectoryInteractive, ActiveDirectoryManagedIdentity, or ActiveDirectoryServicePrincipal must add a PackageReference to Microsoft.Data.SqlClient.Extensions.Azure.• Option A is incorrect: Managed Identity is fully supported via the new extension package.
• Option B is incorrect: SQL Server compatibility levels govern T-SQL query generation, not connection authentication.
• Option D is incorrect:
ActiveDirectoryPassword is marked obsolete in SqlClient 7.0 and is a security anti-pattern.
Q3: Complex Types & JSON Storage on TPT Hierarchies
Your fleet domain uses Table-per-Type (TPT) inheritance, and you want to store the Registration value object as a single JSON column on the base table:
public abstract class Vehicle
{
public int Id { get; set; }
public required RegistrationInfo Registration { get; set; }
}
public class Car : Vehicle { public int Doors { get; set; } }
public class Truck : Vehicle { public decimal PayloadTons { get; set; } }
[ComplexType]
public class RegistrationInfo
{
public required string Plate { get; set; }
public DateOnly? FirstRegistered { get; set; }
}
Which EF Core 11 model configuration achieves this?
• Option A is correct: EF Core 11 lifts the EF Core 10 restriction and supports both column-mapped and
.ToJson() complex types on TPT and TPC hierarchies. Entity inheritance strategy and value-object storage format are now orthogonal choices.• Option B is incorrect: That limitation existed in EF Core 10 and was resolved in EF Core 11.
• Option C is incorrect: Complex types have value semantics without hidden keys, making them cleaner for JSON value objects than owned entity types.
• Option D is incorrect: Calling
UseTptMappingStrategy() without ToJson() maps Registration as flat columns on the base Vehicle table (repeating columns per concrete table only happens under TPC).
Q4: Chained Lambda Configuration & Indexing on Complex Types
Postal code lookups on Customer are causing table scans. Address is a non-collection complex type, and you want to set a max length of 12 and create a relational database index on Address.PostalCode:
public class Customer
{
public int Id { get; set; }
public required Address Address { get; set; }
}
[ComplexType]
public class Address
{
public required string Street { get; set; }
public required string PostalCode { get; set; }
}
Which configuration is valid in EF Core 11?
• Option D is correct: EF Core 11 enables chained member access directly inside
Property(c => c.Address.PostalCode) and allows keys and indexes (HasIndex by lambda or string path "Address.PostalCode") to reach scalar properties inside non-collection complex types.• Option A & B are incorrect: Both describe pre-EF Core 11 workarounds that are no longer needed.
• Option C is incorrect: JSON mapping is not required to index scalar complex-type columns (though EF Core 11 also supports JSON index paths such as
HasIndex("Items[].Sku") on relational JSON columns).
Q5: Azure Cosmos DB Unmapped JSON Properties & Sync I/O
Two microservices share an Azure Cosmos DB container. The Billing service writes a taxRegion JSON field onto order documents. The Orders service—upgraded to EF Core 11—does not have taxRegion on its C# Order entity and runs:
var order = await db.Orders.SingleAsync(o => o.Id == orderId);
order.Status = "Shipped";
await db.SaveChangesAsync();
What happens to taxRegion in Cosmos DB, and how should you prevent data loss?
• Option B is correct: This is the single highest-impact breaking change in EF Core 11. Migrating the Cosmos provider from
Newtonsoft.Json to System.Text.Json removed the hidden __jObject shadow property. Unmapped JSON fields are ignored during deserialization and wiped out when the document is saved back.• Option A is incorrect:
__jObject existed in EF Core 10 and earlier, not EF Core 11.• Option C is incorrect: Synchronous I/O in the Cosmos provider now throws unconditionally in EF Core 11 with zero opt-in.
• Option D is incorrect: Replacing the document writes only the properties known to the EF model.
Q6: SQL Server Compatibility Levels 160 & 170
Immediately after upgrading to EF Core 11, a pricing endpoint starts failing against a production database whose SQL Server compatibility level is still 150:
var prices = await db.Orders
.Select(o => new { o.Id, Effective = Math.Max(o.Discount, o.MinimumDiscount) })
.ToListAsync();
// SqlException: 'GREATEST' is not a recognized built-in function name.
What is the immediate stopgap fix while DBAs plan the database compatibility upgrade?
• Option C is correct: EF Core 11 raised the default SQL Server compatibility level from
150 (SQL Server 2019) to 160 (SQL Server 2022), enabling LEAST, GREATEST, and JSON_PATH_EXISTS. Note that even databases hosted on SQL Server 2022 keep their older compatibility level if restored from an older backup, so check sys.databases or pin UseCompatibilityLevel(150).• Option A is incorrect: T-SQL translation happens inside the EF Core SQL Server provider, not the low-level ADO.NET driver.
• Option B is incorrect: Compatibility level
170 targets SQL Server 2025 (used to unlock JSON_CONTAINS on JSON primitive collections) and still emits GREATEST.• Option D is incorrect:
JsonPathExists checks JSON keys on level 160+ and is unrelated to scalar numeric comparisons.
Q7: Stripping No-Op SQL CASTs & Split-Query Join Pruning
Your integration test suite compares generated SQL against saved baselines. Upgrading to EF Core 11 produces two diffs:
-- EF Core 10 baseline:
WHERE CAST([c].[Email] AS nvarchar(max)) LIKE N'ana%'
-- EF Core 11 output:
WHERE [c].[Email] LIKE N'ana%'
Additionally, an AsSplitQuery() query loading Blogs with Posts no longer joins the BlogTypes reference navigation inside the secondary SQL query for Posts. How should you handle these changes?
• Option A is correct: EF Core 11 strips redundant no-op
CAST expressions (frequent on value-converted properties) during SQL post-processing so indexes aren't blocked. It also prunes unnecessary reference-navigation joins from secondary split-query SQL and trims redundant keys from ORDER BY.• Option B & C are incorrect: These optimizations apply across compatibility levels and are not bugs gated behind a legacy switch.
• Option D is incorrect: The parent query still loads the reference navigation cleanly in one shot; EF simply avoids repeating that join in the child collection query.
Q8: Hybrid Search Queries with the FullJoin LINQ Operator
You are implementing Reciprocal Rank Fusion (RRF) hybrid search combining full-text results and vector similarity results. A document must appear in the combined result even if it matched only one of the two searches, and the entire score fusion must run inside SQL Server:
IQueryable<RankedHit> textHits = /* FreeTextTable(...) top results */;
IQueryable<RankedHit> vectorHits = /* VectorSearch(...) top results */;
// Merge both ranked sets on DocumentId inside SQL without dropping single-side matches
Which .NET 11 / EF Core 11 operator solves this cleanly on the database server?
• Option D is correct: .NET 11 adds the
FullJoin LINQ operator, and EF Core 11 translates it directly to FULL JOIN / FULL OUTER JOIN. Documents appearing only in full-text or only in vector search are preserved (with null on the unmatched side), letting SQL compute the RRF score in one round-trip.• Option A is incorrect: Inner
Join discards any document that didn't hit both search methods.• Option B is incorrect:
LeftJoin drops semantic matches returned exclusively by vector search.• Option C is incorrect: Pulling both candidate sets into C# memory is no longer necessary in EF Core 11.
Q9: DbQueryConcurrencyException in Split Queries
A reporting endpoint loads blogs and their posts via AsSplitQuery() while background workers continuously insert and delete posts. After upgrading to EF Core 11, telemetry logs intermittent DbQueryConcurrencyException errors:
var blogs = await db.Blogs
.Include(b => b.Posts)
.AsSplitQuery()
.ToListAsync();
// Intermittent at high write volume: DbQueryConcurrencyException
Why is this exception thrown in EF Core 11, and what is the recommended mitigation?
• Option C is correct: Because
AsSplitQuery() executes multiple separate SELECT statements without an overarching repeatable snapshot by default, concurrent deletes/updates between queries can desynchronize parent and child rows. EF Core 10 silently materialized empty child collections; EF Core 11 throws DbQueryConcurrencyException instead of returning corrupt state.• Option A is incorrect: Thread-safety violations on
DbContext throw InvalidOperationException ("A second operation was started on this context...").• Option B & D are incorrect: This is a data-consistency safeguard, not a suppressible warning or MARS limitation.
Q10: Asynchronous Validation in Minimal APIs
Your Minimal API signup endpoint needs to verify asynchronously against SQL Server that a requested username isn't already registered:
builder.Services.AddValidation();
app.MapPost("/signup", (SignupRequest request) =>
TypedResults.Created($"/users/{request.Username}", request));
public sealed class SignupRequest
{
[Required, UniqueUsername]
public string? Username { get; set; }
}
How should UniqueUsernameAttribute be implemented in ASP.NET Core 11?
• Option B is correct: ASP.NET Core 11 introduces
AsyncValidationAttribute and IAsyncValidatableObject with concurrent property/element validation across both Minimal APIs and Blazor. Because Minimal APIs always invoke the async validation pipeline, overriding the required sync IsValid to throw InvalidOperationException is the documented pattern (while keeping a DB UNIQUE index for race safety).• Option A is incorrect: Sync-over-async blocks thread-pool threads and risks starvation under load.
• Option C is incorrect:
[ValidatableType] and [SkipValidation] graduated from experimental to stable in .NET 11 (ASP0029 suppressions can be removed).• Option D is incorrect: Both Minimal APIs and Blazor forms support async validation in .NET 11.
Q11: The Cross-Assembly Minimal API Validation Trap
Your solution splits the ASP.NET Core host project from a separate class library containing your Minimal API route groups:
// Host project (Contoso.Api.dll) — Program.cs:
builder.Services.AddValidation();
app.MapOrderEndpoints();
// Separate class library (Contoso.Orders.Endpoints.dll):
public static class OrderEndpoints
{
public static void MapOrderEndpoints(this IEndpointRouteBuilder app) =>
app.MapPost("/orders", (CreateOrderRequest req) => TypedResults.Ok(req));
}
public sealed class CreateOrderRequest
{
[Required, Range(1, 100)] public int? Quantity { get; set; }
}
When a client POSTs { "quantity": 500 }, the API returns 200 OK instead of 400 Bad Request. Why?
• Option A is correct: Microsoft's validation docs explicitly warn about this multi-project architecture trap. Because Roslyn source generators only inspect the compilation where
AddValidation() appears, endpoints in referenced libraries silently skip validation unless services.AddValidation() is also invoked inside that endpoints assembly (or types are explicitly registered via [ValidatableType]).• Option B is incorrect:
[ValidatableType] targets individual types, not external assembly scanning from Program.• Option C is incorrect:
Microsoft.Extensions.Validation is completely independent of MVC controllers.• Option D is incorrect: Validation runs in all hosting environments.
Q12: Convention-Based Validation Localization Keys
You have 40 Minimal API request DTOs decorated with [Required] (with no explicit ErrorMessage property set), including SignupRequest.Email:
builder.Services.AddLocalization();
builder.Services.AddValidation(options =>
{
options.LocalizerProvider = (_, factory) => factory.Create(typeof(ValidationMessages));
});
public sealed class SignupRequest
{
[Required]
public string? Email { get; set; }
}
In what exact order does ASP.NET Core 11 probe ValidationMessages.<culture>.resx, and which single key localizes [Required] across all 40 DTOs?
• Option D is correct: When an attribute omits an explicit
ErrorMessage, ASP.NET Core 11 probes from most-specific to most-general: {DeclaringType}_{MemberName}_{AttributeType}_Error → {DeclaringType}_{AttributeType}_Error → {AttributeType}_Error before falling back to the attribute's default English string. (Note: for custom attributes needing constructor arguments in localized templates, early .NET 11 previews introduced IValidationMessageFormatter, which RC2 simplified to overriding ValidationAttribute.FormatMessage(string format, string name).)• Option A & B are incorrect: Built-in convention lookup uses the full attribute class name ending in
Attribute_Error.• Option C is incorrect: Specific member and type keys take precedence over the global attribute fallback.
Q13: OpenAPI 3.2 Default & Binary File Schemas
After upgrading an invoicing API to .NET 11, an older client generator in CI fails because the emitted spec starts with openapi: 3.2.0. At the same time, you want your PDF download endpoint documented as a binary file schema:
builder.Services.AddOpenApi();
app.MapOpenApi();
app.MapGet("/invoices/{id:int}/pdf", (int id) =>
TypedResults.File(InvoiceRenderer.Render(id), "application/pdf"));
Which configuration solves both requirements cleanly in ASP.NET Core 11?
• Option C is correct: ASP.NET Core 11 switched the default
OpenApiVersion to OpenApiSpecVersion.OpenApi3_2 (and upgraded to Microsoft.OpenApi 3.x). Pinning OpenApi3_1 keeps legacy client generators working, while .Produces<FileContentResult>(contentType: "application/pdf") maps to type: string, format: binary.• Option A is incorrect: Mixing 10.x framework packages into a
net11.0 host is unsupported.• Option B is incorrect: 3.2 is the default since Preview 6, and
byte[] represents a Base64-encoded JSON string rather than a raw binary file stream.• Option D is incorrect: Binary schemas work with any declared media type, including
application/pdf.
Q14: Multiple ProducesResponseType Declarations per Status Code
Review these two endpoints in an ASP.NET Core 11 service—one MVC action returning two different JSON DTO shapes on 200 OK, and one Minimal API returning either JSON or plain text on 200 OK:
[HttpGet("{id:int}")]
[ProducesResponseType<Order>(StatusCodes.Status200OK)]
[ProducesResponseType<OrderSummary>(StatusCodes.Status200OK)]
public IActionResult GetOrder(int id) => /* ... */;
app.MapGet("/items/{id:int}", (int id) => ItemStore.Find(id))
.Produces<Item>(200, "application/json")
.Produces<string>(200, "text/plain");
How does ASP.NET Core 11 emit these response metadata entries in the generated OpenAPI document?
• Option B is correct: In .NET 10, declaring multiple
Produces or [ProducesResponseType] metadata entries for one HTTP status code silently overwrote earlier ones. In .NET 11, every entry is preserved—distinct media types sit side by side, and multiple C# types sharing the same media type merge into an anyOf schema.• Option A, C & D are incorrect: Nothing is overwritten or rejected; audit legacy controllers for accidental duplicate attributes and refresh OpenAPI snapshot tests.
Q15: Replacing the Removed ConcurrencyLimiter Middleware
When retargeting a heavy reporting API to net11.0, your build fails because Microsoft.AspNetCore.ConcurrencyLimiter was removed. Previously, your pipeline throttled all incoming requests globally:
// .NET 10 (compiled with obsolete warning ASP0025):
builder.Services.AddQueuePolicy(o =>
{
o.MaxConcurrentRequests = 2;
o.RequestQueueLimit = 25;
});
app.UseConcurrencyLimiter();
Which .NET 11 replacement preserves pipeline-wide concurrency throttling across every endpoint?
• Option D is correct:
Microsoft.AspNetCore.ConcurrencyLimiter has been deleted in .NET 11 with no 11.x package published. To replicate pipeline-wide throttling across all endpoints without tagging each route individually, configure o.GlobalLimiter on RateLimiterOptions (or attach a named policy via .RequireRateLimiting("heavy") on a root route group) and load-test rejection status codes (503 default vs. 429).• Option A is incorrect: No 11.0.0 NuGet package exists.
• Option B is incorrect: Registering a named policy via
AddConcurrencyLimiter("heavy", ...) does nothing until endpoints opt in with RequireRateLimiting("heavy")—leaving your API completely unthrottled!• Option C is incorrect: Keeping an unmaintained 10.x package is only a temporary stopgap.
Q16: Built-In OpenTelemetry HTTP Tags & Conventional Route Formatting
After upgrading to ASP.NET Core 11, distributed traces suddenly show duplicate http.request.method attributes, and a Grafana alert filtering MVC conventional routes by the raw template {controller}/{action}/{id?} stops firing:
builder.Services.AddOpenTelemetry()
.WithTracing(t => t
.AddAspNetCoreInstrumentation() // Older OpenTelemetry.Instrumentation.AspNetCore version
.AddOtlpExporter());
What caused both symptoms, and how should you resolve them?
• Option A is correct: ASP.NET Core 11 flips
Microsoft.AspNetCore.Hosting.SuppressActivityOpenTelemetryData to false, emitting semantic-convention HTTP server tags out of the box. Updating OpenTelemetry.Instrumentation.AspNetCore prevents duplicate tags, and conventional routes now populate resolved controller/action names (such as Store/Checkout/{id?}).• Option B & D are incorrect: The
AppContext switch only suppresses the built-in tags—it does not revert the resolved http.route format or Activity.StatusDescription changes.• Option C is incorrect: Exporters transmit spans as-is and do not inject HTTP semantic attributes.
Q17: Blazor DisplayName Component Attribute Precedence
A developer uses the new .NET 11 Blazor <DisplayName /> component on a property that carries both [Display] and [DisplayName] attributes:
<label>
<DisplayName For="@(() => Model.ProductionDate)" />
<InputDate @bind-Value="Model.ProductionDate" />
</label>
@code {
public class OrderForm
{
[Required]
[Display(Name = "Production date")]
[DisplayName("Prod. Date")]
public DateTime ProductionDate { get; set; }
}
}
What text does <DisplayName /> render inside the <label>?
• Option C is correct: Blazor's
DisplayName component resolves metadata in strict priority order: [Display] first (which also supports ResourceType localization), then [DisplayName], and finally the raw C# property name (ProductionDate) if neither attribute is present.• Option A, B & D are incorrect: Both attributes compile together legally, and
[Display] always wins over [DisplayName].
Q18: QuickGrid URL-Based Pagination, Sorting & Multi-Grid Pages
A static SSR Blazor page renders two QuickGrid components—one for orders and one for returns. QA reports two bugs: clicking page 2 on Returns also jumps Orders to page 2, and renaming a column's Title from "Total" to "Order Total" broke customers' bookmarked sort links:
<QuickGrid Items="@orders" Pagination="@ordersPaging">
<PropertyColumn Property="@(o => o.Total)" Title="Order Total" Sortable="true" />
</QuickGrid>
<Paginator State="@ordersPaging" />
<QuickGrid Items="@returns" Pagination="@returnsPaging">...</QuickGrid>
<Paginator State="@returnsPaging" />
What explains both behaviors in ASP.NET Core 11?
• Option B is correct: In .NET 11, QuickGrid stores pagination and sorting in URL query parameters (
?page=2&sort=Name&direction=asc) using <a> links so static SSR, bookmarks, and browser history work out of the box. Two grids on one page collide on parameter names unless given distinct QueryParameterNameOptions prefixes, and renaming a column Title invalidates old bookmarked sort URLs.• Option A is incorrect: Static SSR pagination works natively in .NET 11 without interactive SignalR/WASM modes.
• Option C is incorrect:
OnRowClick handles row selection callbacks, not URL state scoping.• Option D is incorrect: URL-based navigation is enabled by default (setting the switch to
false reverts to legacy markup).
Q19: Blazor SSR Antiforgery vs. Automatic Header-Based CSRF
During a .NET 11 upgrade, a developer deletes app.UseAntiforgery() from an existing Blazor Web App because new .NET 11 templates omit it. Soon after, security compliance flags missing hidden form tokens for legacy browsers that don't send Sec-Fetch-Site, while a trusted partner portal posting cross-origin forms receives 400 Bad Request:
var app = builder.Build();
// app.UseAntiforgery(); // Deleted during upgrade!
app.MapRazorComponents<App>();
What is the right architectural fix?
• Option D is correct: In .NET 11, Blazor SSR endpoints defer antiforgery validation to middleware and stop generating hidden form tokens if
app.UseAntiforgery() isn't in the pipeline. Meanwhile, WebApplication.CreateBuilder registers automatic CSRF protection checking Sec-Fetch-Site and Origin across Blazor SSR, form-binding Minimal APIs, and MVC. Restoring app.UseAntiforgery() keeps token protection for legacy browsers, and configuring CORS permits legitimate cross-origin form posts safely.• Option A is incorrect: That was .NET 10 behavior; .NET 11 only generates tokens when token middleware runs.
• Option B is incorrect: Disabling CSRF globally exposes every form endpoint to cross-site attacks.
• Option C is incorrect: Automatic header-based CSRF covers Blazor SSR, Minimal API forms, and MVC.
Q20: Endpoint Filters on Minimal API Parameter Binding Failures
You attach an endpoint filter to wrap parameter-binding 400 Bad Request errors in a standard JSON ProblemDetails envelope. In Production, calling /orders?page=abc returns your custom JSON envelope. In local Development, however, /orders?page=abc throws an unhandled BadHttpRequestException straight to the developer exception page:
app.MapGet("/orders", (int page) => OrderStore.GetPage(page))
.AddEndpointFilter(async (ctx, next) =>
{
if (ctx.HttpContext.Response.StatusCode == StatusCodes.Status400BadRequest)
{
return TypedResults.Problem(title: "Invalid parameter", statusCode: 400);
}
return await next(ctx);
});
How do you make Development execute the endpoint filter on binding failures just like Production?
• Option A is correct: ASP.NET Core 11 executes endpoint filters even when parameter binding fails so filters can customize
400 responses. Because the Development environment defaults RouteHandlerOptions.ThrowOnBadRequest to true (throwing BadHttpRequestException early for debugging), setting builder.Services.Configure<RouteHandlerOptions>(o => o.ThrowOnBadRequest = false) aligns local Development with Production.• Option B is incorrect: Prior to .NET 11 filters skipped binding failures, but .NET 11 specifically added filter execution for failed binding.
• Option C & D are incorrect:
[ShortCircuit] bypasses post-routing middleware, and OpenTelemetry switches have no effect on parameter binding.
EF Core 11 & ASP.NET Core 11 Cheat Sheet: High-Impact Rules
Bookmark this quick-reference table before running your .NET 11 migration branch into staging:
| Component | .NET 11 Behavior / Syntax | Production Impact & Action Required |
|---|---|---|
| Cosmos DB Unmapped JSON | System.Text.Json replaces __jObject |
High risk: Unmapped fields are dropped on save. Map all shared fields or use CosmosClient. |
SqlClient 7.0 Entra Auth |
Microsoft.Data.SqlClient.Extensions.Azure |
Required explicitly whenever connection strings use Managed Identity or Entra ID auth. |
SqlVector<T> Columns |
.Select(d => new { d.Id, d.Embedding }) |
Excluded from default entity SELECT; returns null unless explicitly projected. |
| Complex Types & Indexing | Property(c => c.Address.PostalCode) |
Works with TPT, TPC, ToJson(), and relational HasIndex(...) paths. |
| Minimal API Validation | AddValidation() + AsyncValidationAttribute |
Must be called inside each assembly containing Minimal API endpoints so source generators run. |
| OpenAPI 3.2 & Files | OpenApiSpecVersion.OpenApi3_2 default |
Pin OpenApi3_1 for legacy client tools; use Produces<FileContentResult> for binary files. |
| Rate Limiting | o.GlobalLimiter = PartitionedRateLimiter... |
ConcurrencyLimiter package deleted; use GlobalLimiter for pipeline-wide throttling. |
| Blazor QuickGrid & CSRF | URL query state + Sec-Fetch-Site checks |
Prefix multi-grid pages with QueryParameterNameOptions; keep UseAntiforgery() if tokens are required. |
Key Takeaways for Your .NET 11 Upgrade
• Audit Silent Behavioral Shifts First: Compiler errors like the removed
ConcurrencyLimitermiddleware are easy to spot. Silent runtime changes—SqlVector<T>returningnull, Cosmos DB dropping unmapped JSON properties, and cross-assembly Minimal API validation returning200 OK—are the ones that cause production incidents.• Test Cloud Auth & Database Levels in Staging: Local Docker containers using SQL passwords and latest images hide both the missing
Microsoft.Data.SqlClient.Extensions.Azurepackage and SQL Server compatibility level160(LEAST/GREATEST) errors.• Check Downstream OpenAPI & Telemetry Consumers: Updating to .NET 11 changes your emitted OpenAPI version to
3.2, merges duplicate status responses intoanyOf, and resolves conventional MVC routes inhttp.routespans.
Frequently Asked Questions (.NET 11 Practice Test FAQ)
Quick answers to common EF Core 11 and ASP.NET Core 11 migration questions:
Why does EF Core 11 return null for SqlVector properties?
EF Core 11 omits SqlVector<T> columns from default entity SELECT queries so routine reads do not transfer large float arrays across the wire. You can still filter and order by vector distance in SQL, and you can load the vector into C# whenever needed with an explicit .Select() projection.
Why are my Minimal API validation attributes ignored in a separate class library?
The Microsoft.Extensions.Validation source generator only discovers parameter types in the assembly where AddValidation() is called. Expose a service-registration extension method inside your endpoints class library that calls services.AddValidation(), and invoke it from Program.cs.
Does removing app.UseAntiforgery() in .NET 11 leave Blazor SSR forms unprotected?
Apps built with WebApplication.CreateBuilder get automatic header-based CSRF protection using Sec-Fetch-Site and Origin headers. However, removing app.UseAntiforgery() stops hidden form token generation, so you should keep it if you support older browsers or require token-based compliance.
How do I test Minimal API binding-failure endpoint filters in Development?
In the Development environment, ASP.NET Core throws BadHttpRequestException by default before endpoint filters run. Configure RouteHandlerOptions.ThrowOnBadRequest = false so local Development sets a 400 status code and runs your endpoint filter pipeline just like Production.
Next Step in Your .NET 11 Mastery
Great work finishing all 20 scenario questions! If any question caught you off guard, review the side-by-side before-and-after code examples and our 11-step production upgrade checklist in the main guide:
Source:
Microsoft Learn — What's New in EF Core 11 | EF Core 11 Breaking Changes | What's New in ASP.NET Core 11 | ASP.NET Core 11 Breaking Changes
