Explain usage of Dependency Injection in ASP.NET Core

Technology CommunityCategory: ASP.NETExplain usage of Dependency Injection in ASP.NET Core
VietMX Staff asked 3 years ago

Dependency Injection comes as a part of ASP.NET Core Framework and everything is built around it. When you want to use some tool and its services, you usually add the NuGet package and you use one of its extension methods to add the package to the ASP.NET Core’s DI container. You can extend the current DI with a container of your choice (AutoFac, StructureMap, CastleWindsor etc).