A Small Decision That Determines Whether Your Code Can Be Tested: Interface or Concrete Class in DI Registration

Lifetime selection Singleton, Scoped, or Transient usually receives the most attention when examining Dependency Injection configurations. Alongside it comes a less noticeable but no less significant detail: whether the registration registers a concrete class independently or translates an interface to an implementation. Although this decision seldom results in an obvious flaw, it may have a …