Dependency Injection

Dependency Injection of AppSettings in ASP.NET Core

December 30, 2021 in Dependency Injection Testing
Read Time: 5 minutes
Dependency Injection of AppSettings in ASP.NET Core
When talking about the Dependency Inversion Principle, the D in SOLID, we have a pretty good idea of what dependencies we’re trying to abstract away. OrderRepository or SendGridEmailClient are easy examples of implementations we should abstract away. It also overlaps well with the Single Responsibility Principle, since data access for orders and sending emails are separated from the business logic where they are used. The C# implementation of this would involve making these classes implement the appropriate interfaces, e.
Read more...