Structuring Dependency Injection In ASP.NET Core The Right Way



Structuring Dependency Injection In ASP.NET Core The Right Way

Structuring Dependency Injection In ASP.NET Core The Right Way

Support me on Patreon to access the source code:
https://www.patreon.com/milanjovanovic

Dependency injection is one of the best features that ASP.NET Core introduced. With transient, scoped and singleton service lifetimes, there are many concepts to grasp. So it’s easy to lose sight of the dependency injection configuration code. In this video, I’ll show you two ways to organize your dependency injection configuration with maintainability in mind.

Join my weekly .NET newsletter:
https://www.milanjovanovic.tech

Read my Blog here:
https://www.milanjovanovic.tech/blog

Subscribe for more:
https://www.youtube.com/@MilanJovanovicTech?sub_confirmation=1

Chapters
0:00 The problem with the Services configuration
0:57 Extension methods for Services configuration
8:21 Potential issue with the extension methods approach
9:15 IServiceInstaller for Services configuration

Comments are closed.