23 min read
EF Core Split Queries: The Hidden LIMIT Slowing PostgreSQL
EF Core split queries with SingleOrDefaultAsync hide a LIMIT subquery PostgreSQL can't optimize. One extension method took an endpoint from 5.45s to 155ms.
> the blog
Practical, code-first guides on .NET, C#, ASP.NET Core Minimal APIs, EF Core and Azure.
23 min read
EF Core split queries with SingleOrDefaultAsync hide a LIMIT subquery PostgreSQL can't optimize. One extension method took an endpoint from 5.45s to 155ms.
12 min read
Learn how to validate options asynchronously at startup in .NET 11 with IAsyncValidateOptions and the new async Validate overloads, so your application fails fast when a configured endpoint is unreachable or misconfigured.
14 min read
Learn how to use C# 15 union types in ASP.NET Core 11 Minimal APIs. We declare unions, use exhaustive pattern matching, accept and return them as JSON, see how they show up in OpenAPI, and compare them with closed class hierarchies.
14 min read
Learn how to localize validation error messages and display names in .NET 11 Minimal APIs using the built-in localization support in Microsoft.Extensions.Validation, resource files, convention-based keys, and custom attributes.
13 min read
Learn how to use the new async validation support in .NET 11 Minimal APIs with AsyncValidationAttribute and IAsyncValidatableObject to run database-backed validation rules before your endpoint handlers even execute.