Bald Bearded Builder
topics/aspnetcore

/aspnetcore

Minimal APIs, middleware, dependency injection, configuration, and the parts of the request pipeline that only bite you in production.

Articles filed under aspnetcore

Article

Tame Configuration in ASP.NET Core with IValidateOptions

Silent misconfiguration is sneaky and expensive. Learn how to validate strongly typed settings in .NET using IValidateOptions, add cross property rules, inject services, support named options, and fail fast at startup with ValidateOnStart.

5 min1 like0 comments
Article

Stop Breaking Clocks in ASP.NET Core with UTC and TimeZoneInfo

Time bugs are sneaky and expensive, but they do not have to be. This post shows a practical UTC first approach for ASP.NET Core using DateTimeOffset and TimeZoneInfo. You will learn how to design your data model, return UTC from APIs, convert to a user’s local time, and avoid DST traps without hard coded offsets. We will also wrap conversions in a clean service and make time testable with TimeProvider.

4 min0 likes0 comments
Article

From Layers to Slices: How I Ship Faster ASP.NET Core APIs

Your API should feel like a collection of small, focused stories, not a scavenger hunt through Services and Interfaces. This tutorial shows how to build a feature first Vertical Slice Architecture in ASP.NET Core using Minimal APIs, MediatR, and FluentValidation. You will see how commands and queries stay tidy, how validation runs before handlers, and how the folder structure reduces friction as your API count grows.

4 min0 likes0 comments
Article

How .NET 10 speeds up API validation without code changes

Model validation has been a reliable but costly part of every ASP.NET Core request. In .NET 10 and C# 14, validation gets faster through precomputed metadata, typed execution, and fewer allocations. This post explains what changed under the hood, shows small runnable examples, and includes a micro-benchmark you can adapt. You will also see how to write lean custom validators and pair validation with faster JSON parsing.

4 min0 likes0 comments
Article

Choosing Between Controllers and Minimal API for .NET APIs

.NET now offers several methods for creating APIs. Let's cover the pros & cons of building with Controllers, Minimal API, and more.

6 min0 likes0 comments
Article

Using AutoMapper with ASP.NET Core 3

AutoMappers usage via dependency injection changed in ASP.NET Core 3. This post shows how to use the new implementation.

3 min0 likes0 comments
Article

Adding HATEOAS to an ASP.NET Core API

RESTful APIs provide a great way to make our APIs easier for users to consume. How can we make discovering endpoints and capabilities easier?

6 min0 likes0 comments