site image
Andrew Lock avatar

Andrew Lock

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

    30% off with code ANDREW30 on Dometrain Pro
  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 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.…

  5. 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 CoreDependency Injection
  6. 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.…

  7. 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 CoreDependency Injection
  8. 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.…

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

Andrew Lock | .Net Escapades
Want an email when
there's new posts?