Blog Posts for: Dependency Injection

Disposing of services when using Dependency Injection with .NET Core console apps
19 June 2018

Look at how you can ensure that services are disposed of when using dependency injection with .NET Core Console applications.

Dependency injection with Autofac and Azure WebJobs
25 August 2015

Shows how you can use Autofac to resolved WebJob instances and inject dependencies into your web jobs

Resolve dependencies differently depending on whether user is logged in
18 August 2015

I demonstrate how you can use Autofac to resolve dependencies differently based on whether the user is authenticated or not.

Using Fluent Validation with ASP.NET MVC - Part 3: Adding Dependency Injection
26 May 2013

Part 3 of 4 of my introduction to using FluentValidation in ASP.NET MVC. This post covers how to inject dependencies into your validation classes.