Sumit Bakshi
What is difference between Dependency Inversion and Dependency Injection?
By Sumit Bakshi in .NET on Jul 19 2020
  • Jay Krishna Reddy
    Jul, 2020 20

    Dependency Injection is an Inversion of Control technique for supplying objects (‘dependencies’) to a class by way of the Dependency Injection Design Pattern. Typically passing dependencies via one of the following:

    A constructor
    A public property or field
    A public setter

    The Dependency Inversion Principle (DIP) is a software design guideline which boils down to two recommendations about de-coupling a class from its concrete dependencies:

    ‘High-level modules should not depend on low-level modules. Both should depend on abstractions.’
    ‘Abstractions should not depend upon details. Details should depend upon abstractions.’

    Hope it helps you ..!

    • 1
  • Varun Setia
    Jul, 2020 27

    Dependency Inversion is a Principle part of SOLID Principles, Dependency Injection is the implementation of Dependency Inversion. IoC is when the container/system/library initiates the call.

    • 0

Most Popular Job Functions


MOST LIKED QUESTIONS