- Loading...
Sponsored by Dometrain Courses—Get 30% off Dometrain Pro with code ANDREW30 and access the best courses for .NET Developers

My new book ASP.NET Core in Action, Third Edition is available now! It supports .NET 7.0, and is available as an eBook or paperback.

Four ways to dispose IDisposables in ASP.NET Core
This post presents the options for disposing services in ASP.NET Core: manually; using the DI container; with RegisterForDispose; or IApplicationLifetime.…

Using dependency injection in a .Net Core console application
In this post, I show how to setup dependency injection in a .NET Core console app, both with the ASP.NET Core built-in container and with StructureMap.…

Accessing services when configuring MvcOptions in ASP.NET Core
This post is a follow on to one by Steve Gordon, in which I show a clean way to use configured services when setting up MvcOptions when calling AddMvc.…

Injecting services into ValidationAttributes in ASP.NET Core
This post describes how to use dependency injection with ValidationAttributes in ASP.NET Core, and the process I took in trying to figure out how!…

Configuring environment specific services in ASP.NET Core - Part 2
In this post I show an approach to configuring environment specific services using naming conventions built into the Startup class and the WebHostBuilder.…

Configuring environment specific services for dependency injection in ASP.NET Core
In this post I show how you can configure dependency injection so that different services will be injected when you are in a development environment.…

