Blog.NET
.NET articles
Practical .NET for production APIs. These posts cover the ASP.NET Core request pipeline (middleware, filters, ProblemDetails), EF Core internals such as interceptors and bulk operations, configuration and the options pattern, and the .NET 10 and C# 14 features worth adopting.
14 articles · ← All articles
- 10 min
What features did C# 15 and .NET 11 bring?
Union types finally ship in C# 15, alongside closed hierarchies and labeled break. .NET 11 adds runtime async, cleaner stack traces and LINQ FullJoin.
- 7 min
EF Core interceptors, part 3: intercepting connections and transactions
DbConnectionInterceptor can set a per-tenant connection string as EF Core opens a connection. DbTransactionInterceptor can hold side effects until commit.
- 5 min
EF Core interceptors, part 2: intercepting database commands
DbCommandInterceptor sees every SQL command EF Core sends. Compare eventData.Duration with a threshold to log slow commands, and handle failures separately.
- 8 min
EF Core interceptors, part 1: how they work and how to audit SaveChanges
EF Core interceptors observe, modify, or suppress SaveChanges, connections, transactions, and commands. A SaveChangesInterceptor sets audit fields in one place.
- 8 min
3 ways to create middleware in .NET: inline, convention-based, and IMiddleware
ASP.NET Core middleware can be inline, convention-based, or IMiddleware. Convention-based classes must take scoped services in InvokeAsync, not the constructor.
- 14 min
Resource expansion in ASP.NET Core: the expand query parameter
An ?expand= parameter returns related data in one request. With 20 ms of latency it ran 3x faster than separate requests; bound it with an allowlist and limits.
- 7 min
Inside dotnet/extensions: resilience, telemetry, and AI for .NET services
dotnet/extensions is nine independent packages for resilience, AI, telemetry, redaction, and testing. Start with the one-line HttpClient resilience handler.
- 10 min
Configuration in .NET: Options pattern, validation, reloading, and secrets
The options pattern adds DI, validation, and lifetimes to IConfiguration: IOptions for fixed values, IOptionsSnapshot per request, IOptionsMonitor for reloads.
- 6 min
Configuration in .NET: sources, providers & precedence
.NET merges appsettings.json, environment variables, and command-line args into one IConfiguration, and the provider registered last wins.
- 6 min
.NET 10 and C# 14: The features I'd actually use in production
The C# 14 and .NET 10 features that earn their place in production: field, null-conditional assignment, extension members, Minimal API validation, and SSE.
- 6 min
ProblemDetails in .NET: A practical guide to standardized API errors
Return consistent API errors in .NET with ProblemDetails: the RFC 9457 fields, Results.Problem, ValidationProblemDetails, and IExceptionHandler.
- 7 min
Filters in .NET: Complete guide to authorization, resource, action, exception, and result filters
ASP.NET Core filters run in the MVC pipeline after action selection, so authorization, validation, and error handling live in one place, not in every action.
- 7 min
Introduction to Entity Framework Extensions library
SaveChanges() generates one SQL statement per entity, a bottleneck at scale. EF Extensions adds true bulk operations to your existing DbContext.
- 6 min
Why every .NET developer should know about Dapper Plus
Dapper is famous for fast reads, but bulk writes are its weak spot. Dapper Plus fills that gap with one-line bulk insert, update, delete, merge and synchronize.