Dependency Injection

Runtime Dependency Resolution Using AutoFac in .NET 6 Isolated Azure Functions

Need to specify a dependency at runtime in an Azure Function? Can it be done?

Posted on 30 November 2021

Using AutoFac Keyed Dependencies Directly in .NET 6 Isolated Azure Functions

Autofac allows for using Named or Keyed dependencies. Can these be used directly in .NET 6 Isolated Azure Functions without additional layers?

Posted on 26 November 2021

Using AutoFac Keyed Dependencies with .NET 6 Isolated Azure Functions

Autofac allows for using Named or Keyed dependencies. Can these be used with .NET 6 Isolated Azure Functions?

Posted on 19 November 2021

Using AutoFac with .NET 6 Isolated Azure Functions

Having the ability to use the Inversion of Control container of choice in your application is important. But can you use AutoFac with Azure Functions? Let's find out!

Posted on 09 November 2021

Simple Example of Calling REST API with HttpClient in .NET 5.0

Beginner friendly usage of a HttpClient in a console application to make a simple request but using dependency injection to create HttpClient instances.

Posted on 25 May 2021

Debugging Dependency Injection Service Registrations in .NET 5.0

Investigating a technique on how to debug service registrations when functionality isn't working as expected.

Posted on 12 January 2021

Top Level Statements and Dependency Injection in .NET 5.0

Exploring Top Level statements in .NET 5 and manually setting up and using dependency injection with the Microsoft container.

Posted on 05 January 2021

Optional Dependencies with Autofac

Ever wanted to define a dependency as optional and only be loaded depending on consumption of your service?

Posted on 30 June 2020

Inject JsonSerializerOptions so Don't Repeat Yourself

How many times do you create a private options variable when using json serializer and end up with duplicate code? Let's take a look at one option to help resolve this.

Posted on 31 March 2020

Multiple Ways to Register Your Dependencies with ASP.NET Core 3

Exploring the multiple ways you can register your service dependencies with the new IHost found in ASP.NET Core 3 (Preview).

Posted on 17 June 2019

Registering Services with DotNet Worker Project

How to register services and dependencies in the new dotnet core worker project

Posted on 15 June 2019