Dependency Injection with Autofac

Dependencies Injection is a pattern which could be very helpful to create a maintainable and a less complex code. It is a form of IoC (Inversion of Control). The aim of this pattern is to give away the responsibility to instance some objects within own code. That means we don’t need to take care of, how, when and where we create an instance of an object. Also you have the possibility to mock up the interfaces and services in order to create unit tests. If you once understand it, you will never want to code without it again.

(mehr …)