Skip to content

Tag: Autofac

Dependency Injection using Autofac

In the previous post, we saw how we can inject dependencies without any DI container. However, in this post, we will see how DI containers help us by instantiating the dependencies and provide them whenever and wherever required.   What is a DI Container? In the example for our last post, we had to instantiate dependencies on our own, before injecting them via constructor. Consequently, as…