Service Lifetime in Dependency Injection

In this blog post, I am going to discuss the Dependency Injection Service Lifetime. In the out-of-box Dependency Injection container in .NET Core or .NET 5.0, there are three main service lifetime options available. The main focus of this blog post will be discussing the details of each of the three service lifetime that comes … Read more

Autofac as IoC Container for .NET Core

In my last blog post https://dotnetcorecentral.com/blog/dependency-injection-in-net-core-console-application/, I have explored using Dependency Injection in .NET Core console application. But, in this blog post, I will explore using Autofac as the Dependency Injection container for .NET Core Console application. What is Autofac Autofac is an Inversion Of Control (IoC) container for .NET Framework and .NET Core. I … Read more

Dependency Injection in .NET Core Console Application

In this blog post, I will write about Dependency Injection in .NET Core Console Application. I will start from where I left in my last blog https://dotnetcorecentral.com/blog/docker-running-background-thread/. What is Dependency Injection? In Dependency Injection, dependencies of an object are sent from outside. Meaning, the dependencies of an object are not created inside of the class. … Read more