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 Accessing services when configuring MvcOptions in ASP.NET Core

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

  5. Banner image for Injecting services into ValidationAttributes in ASP.NET Core

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

     in  ASP.NET Core Dependency Injection
  6. Banner image for Configuring environment specific services in ASP.NET Core - Part 2

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

     in  ASP.NET Core Dependency Injection Environment
  7. Banner image for Configuring environment specific services for dependency injection in ASP.NET Core

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

     in  ASP.NET Core Environment Dependency Injection
  8. Banner image for Access services inside ConfigureServices using IConfigureOptions in ASP.NET Core

    Access services inside ConfigureServices using IConfigureOptions in ASP.NET Core

    This post shows how you can inject services when configuring IOptions implementations in your Startup class using the IConfigureOptions interface.…

  9. Banner image for Getting started with StructureMap in ASP.NET Core

    Getting started with StructureMap in ASP.NET Core

    In this post I'll show how you can replace the default ASP.NET Core DI container with StructureMap, to give easy convention based configuration.…

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