site image
Andrew Lock avatar

Andrew Lock

Dependency Injection
  1. Loading...
  2. 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"!

    From Zero to Hero: REST APIs in .NET
  3. ASP.NET Core in Action, Third Edition

    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.

  4. Banner image for Using Scrutor to automatically register your services with the ASP.NET Core DI container

    Using Scrutor to automatically register your services with the ASP.NET Core DI container

    In this post I describe how to use the open source library Scrutor to add assembly scanning capabilities to the ASP.NET Core DI container.…

     in  ASP.NET Core .NET Core Dependency Injection
  5. Banner image for How to register a service with multiple interfaces in ASP.NET Core DI

    How to register a service with multiple interfaces in ASP.NET Core DI

    In this post I describe how to register a class that implements multiple interfaces with the ASP.NET Core DI container, and how to avoid a common bug…

     in  ASP.NET Core .NET Core Dependency Injection
  6. Banner image for The difference between GetService() and GetRequiredService() in ASP.NET Core

    The difference between GetService() and GetRequiredService() in ASP.NET Core

    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  ASP.NET Core .NET Core Dependency Injection
  7. Banner image for Controller activation and dependency injection in ASP.NET Core MVC

    Controller activation and dependency injection in ASP.NET Core MVC

    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.…

     in  ASP.NET Core Dependency Injection
  8. Banner image for Four ways to dispose IDisposables in ASP.NET Core

    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.…

     in  ASP.NET Core Dependency Injection
  9. Banner image for Using dependency injection in a .Net Core console application

    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.…

     in  .NET Core Dependency Injection
Andrew Lock | .Net Escapades
Want an email when
there's new posts?