Implement Dependency Injection in ASP.NET Core

Опубликовано: 26 Октябрь 2024
на канале: Tech With Pat
8,583
252

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:
°    / @techwithpat  

🔗 Links:
° https://docs.microsoft.com/en-us/aspn...
° https://en.wikipedia.org/wiki/Depende...

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

#aspnetcore #dependencyinjection