.NET Console Application Dependency Injection

When working with console applications, you need to manually define your service provider and scopes, but other than that, it functions as you are used to with ASP.NET.

Make sure you're choosing the proper lifecycle for your dependencies - Singleton, Transient, or Scoped.

View code on GitHub


Popular posts from this blog

DotNet CLI

Switch Expressions

C# Yield