← Back
Milan Jovanovic October 11, 2025 39s

How I Cut My Dependency Injection Code in Half

Summary

The transcript discusses Scrutor, a library for simplifying dependency injection in .NET by enabling assembly scanning and automatic class registration. Scrutor allows developers to register classes with dependency injection, either as themselves or through implemented interfaces, and assign service lifetimes like scoped services. While the library offers convenient registration methods, it has limitations including lack of native AOT compatibility and potential startup performance overhead in certain scenarios like cloud functions. For most long-lived web applications, the registration benefits outweigh the minor performance considerations.

View original episode ↗