Skip to content

CRARCH0018 Avoid concrete type injection

  • Category: Architecture
  • Default severity: Warning
  • Diagnostic ID: CRARCH0018

Constructor dependencies should favor abstractions for loose coupling.

Constructor dependency '{0}' should be an interface abstraction

Inject interfaces instead of concrete classes. Types marked with [ReadModel] are exempt.