Dependency Injection

General
- ASP.NET is designed from scratch to support Dependency Injection (DI).
- DI is a software design pattern which is a technique for achieving inversion of control between classes and their dependencies.
- NET Core injects objects of dependency classes through constructor or method by using a built-in IOC (Inversion of Control) container.
- IOC container is a framework for implementing automatic dependency injection.
- IOC container creates an object of the specified class and also injects all of the dependencies objects through constructors, property or method at runtime and disposes it at the appropriate time.
- This ensures that you do not have to create and manage the objects manaully.
- DI is a pattern that can help developers decouple the different pieces of their applications.
- In ASP.NET Core, both framework services and application services can be injected into your classes, rather than being tightly coupled.