Dependency Injection (DI)

Dependency Injection (DI)

  • DI is one of the primary ways to implement IoC
  • Through DI, components receive their dependencies from IoC container rather than creating them themselves
  • Type
    • Constructor Injection
    • Method Injection
    • Property Injection