Implement Dependency Injection in ASP.NET Core



Implement Dependency Injection in ASP.NET Core

Implement Dependency Injection in ASP.NET Core

In this tutorial, we will go over what Dependency Injection is, as well as how to use it with ASP.NET Core. DI is a powerful technique for writing loosely coupled and testable applications. We’ll learn how to configure service providers and then use them throughout the application.

🕑 Timestamp :
00:00 Introduction
00:22 Coupling
01:48 Dependency Inversion Principle
03:19 Dependency Injection
05:45 Method Injection and Registering a generic service
07:50 Injecting a service into a View
09:45 Injecting HttpClient
11:20 Grouping service registrations
12:39 Avoid overriding registered services
13:11 Outro

🙏 Subscribe:
° https://www.youtube.com/channel/UCWIgdMSJn8X9IwylP-7Ad8w?sub_confirmation=1

🔗 Links:
° https://docs.microsoft.com/en-us/aspnet/core/fundamentals/dependency-injection?view=aspnetcore-5.0#services-injected-into-startup
° https://en.wikipedia.org/wiki/Dependency_inversion_principle

🌎 Where to find me:
° Github: https://github.com/techwithpat
° LinkedIn: https://www.linkedin.com/in/patrick-tshibanda-431017135/

#aspnetcore #dependencyinjection

Comments are closed.