← Back
Milan Jovanovic September 23, 2025 14m

.NET Dependency Injection Done Right

Summary

The video discusses organizing dependency injection (DI) code in .NET applications, highlighting the common problem of messy, unstructured DI configuration. The presenter recommends using extension methods on the IServiceCollection interface to encapsulate and modularize DI setup, demonstrating how to create clean, reusable methods for registering services like exception handlers. The practical takeaway is to break down DI configuration into logical, manageable extension methods that improve code readability, maintainability, and prevent the DI setup from becoming an unmanageable "pile of mess" over time.

View original episode ↗