Start with the basic premise of dependency injection and move onto some intermediate to advanced topics. We'll explore some basic functionality of popular dependency injection frameworks including Unity, Ninject, and Autofac.
a software design pattern that implements inversion of control for resolving dependencies. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) that would use it.
New Project • Ex02 - “new” everywhere! • Ex03 - Field level service • Ex04 - Poor Man’s DI • Ex05 - Poor Man multi-layer • Ex06 - Unity • Ex07 - Ninject • Ex08 - Autofac • Ex09 - Put it all together
of Control uses. If you’re doing Inversion of Control then you’re doing Dependency Injection. If you’re doing Dependency Injection you may not necessarily be doing IoC. The distinguishing feature of IoC is instead of the dependency flowing from top to bottom, the flow is from bottom to the top. In other words, the data layer would depend on the business layer, your business layer depends on UI, etc. Inversion of Control is a topic for another time.