What is Dependency Injection (DI)?
15
18-Mar-2026
Updated on 18-Mar-2026
Anubhav Sharma
18-Mar-2026Dependency Injection is a design pattern used to achieve loose coupling between classes.
ASP.NET Core has built-in DI container.
Example:
Service lifetimes: