Dependency Injection (DI)
By Tiationg Kho |
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