Dependency Injection in .NET 6 - Service Lifetimes
What's the difference between Transient, Scoped, and Singleton services?
What's the difference between Transient, Scoped, and Singleton services?
Adding dependencies to the .NET 6 container, and injecting them into our classes.
What is dependency injection, and why should we bother?
Let's build a complex but useful architecture called the Repository-Service pattern to clearly enforce separation of concerns.
I'm a huge fan of Dependency Injection (DI) [https://exceptionnotfound.net/getting-started-with-dependency-injection-in-asp-net-core/]. It's gotten to the point where it's almost in my blood (pun intended). DI is standard issue on all my team's projects, and I fail any code reviews that don't include it unless there's a really solid reason