Topic / 17 pieces

ASP.NET Core

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

Everything about ASP.NET Core.

Newest first. No clever sorting hiding the good stuff.

Article / aspnetcore

Five DI Anti-Patterns Haunting .NET Apps and how to fix Them

Dependency injection is powerful until small mistakes turn into late night outages. This post walks through five common DI anti patterns in .NET, shows why they fail, and gives compact fixes. Learn lifetime rules, avoid hidden dependencies, and make testing easy.

4 min0 likes
Article / aspnetcore

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 like
Article / aspnetcore

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 likes
Article / aspnetcore

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 likes
Article / aspnetcore

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 likes
Short / aspnetcore

Fix Ambiguous Constructors in ASP.NET Dependency Injection!

Ambiguous ASP.NET Core dependency injection constructors can be resolved with an explicit constructor attribute, a factory, or keyed services.

0:542,873 views84 likes
Video / aspnetcore

Dependency Injection Mistakes You Need to Avoid!

Five ASP.NET Core dependency injection failures cover missing registrations, circular dependencies, lifetime mismatches, ambiguous constructors, and scoped services used by background work.

7:578,503 views344 likes
Short / aspnetcore

IExceptionHandler Makes ASP.NET Exceptions Easy

.NET 8's `IExceptionHandler` supports centralized ASP.NET exception handling through built-in middleware and modular handlers for specific exception types.

0:571,546 views79 likes
Video / aspnetcore

Building Custom Middleware for ASP.NET Core

Queues, stacks, and dictionaries solve distinct C# collection problems involving fair ordering, last-in-first-out history, and fast typed lookups.

13:4112,284 views404 likes
Video / aspnetcore

Handle ASP.NET Core Exceptions Globally

C# pattern matching can compare a boxed runtime value with a constant even when equality operators reject the incompatible static types.

9:3416,231 views605 likes
Short / aspnetcore

Don't Make This Dependency Injection Mistake!

Injecting a shorter-lived service into a longer-lived one effectively extends the dependency's lifetime and creates invalid service designs.

1:493,716 views139 likes
Short / aspnetcore

It's ALWAYS CORS!!!!

A live debugging attempt moves from successful compilation to a failed fetch before identifying CORS as the culprit.

0:24610 views17 likes
Video / aspnetcore

Should my Services be Transient, Scoped, or Singleton?

.NET dependency injection lifetimes are explained through transient, scoped, and singleton services, including the risks of mutable singletons and injecting shorter-lived dependencies into longer-lived services.

3:4020,329 views778 likes
Video / aspnetcore

MVC vs. Minimal API vs. FastEndpoints - Which is Best for Your Project?

ASP.NET controllers, minimal APIs, and FastEndpoints offer different tradeoffs in organization, dependency injection, documentation, syntax, and built-in features.

4:3925,308 views673 likes
Article / aspnetcore

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 likes
Article / aspnetcore

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 likes
Article / aspnetcore

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 likes
Browse every topic