Publishing Bi-Weekly · ASP.NET Core · Design Patterns · Architecture · 20 yrs C#/.NET · cleancsharp.com
// Topic

Dependency Injection

DI in ASP.NET Core done right: service lifetimes, captive dependencies, and why 'new' is a liability in production code.

posts
Dependency Injection, Best Practices"> 0
Live Dependency Injection

🚀 Dependency Injection in ASP.NET Core — Stop Using 'new'

`new OrderService()` looks innocent. But now every test needs a real OrderService, a real database, and a real connection string. A test that should take 50ms takes 2 seconds and breaks when the DB blinks. Dependency injection isn't framework magic — it's a habit.