Sponsored by Nick Chapsas—Want to learn how to build elegant REST APIs in .NET? Get 5% off Nick's latest course "From Zero to Hero: REST APIs in .NET"!
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. Get 45% off with the code pblock3, only until August 17th!
Keyed service dependency injection container support
Exploring the .NET 8 preview - Part 6
In this post I discuss the new "keyed service" support for the dependency injection container, introduced in .NET 8 preview 7…
The dangers and gotchas of using scoped services in OptionsBuilder
In this post I look at the problems you can hit with strongly-typed settings when you inject Scoped services into OptionsBuilder, and how to avoid them…
New dependency injection features in .NET 6
Exploring .NET 6 - Part 10
In this post I talk about some of the new features added to the DI libraries in .NET 6, as well a performance feature that didn't make it in.…
Using Quartz.NET with ASP.NET Core and worker services
In this post I show how to run Quartz.NET jobs in ASP.NET Core and worker service apps using the Quartz.Extensions.Hosting package…
Controlling IHostedService execution order in ASP.NET Core 3.x
In this post I show how to control whether your IHostedService runs before or after the GenericWebHostService starts the Kestrel HTTP server…
DI scopes in IHttpClientFactory message handlers don't work like you think they do
In this post I discuss how handler DI scopes work in IHttpClientFactory, and how they're different to the request DI scope.…