My new book ASP.NET Core in Action, Second Edition is available now! It supports .NET 5.0, and is available as an eBook or paperback. You even get a free copy of the first edition of ASP.NET Core in Action!
This post looks at the GetService() and GetRequiredService() methods of the ASP.NET Core DI container, the difference between them and which you should use…
In this post, I'll describe how controllers are created in ASP.NET Core MVC using the IControllerActivator and the options available out of the box.…
This post presents the options for disposing services in ASP.NET Core: manually; using the DI container; with RegisterForDispose; or IApplicationLifetime.…
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.…
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.…
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!…
Stay up to the date with the latest posts!