What is IoC in .NET

Possible duplicate:
What is control inversion?

I am not familiar with inverse control (IoC). What is IoC and how applications can use IOC. How is this implemented in .NET with C #?

+4
source share
1 answer

If you have a set of classes that depend on eachother, it is difficult to replace a class with another (better / cheaper / faster) class that does the same job. To make your code more flexible, you can use dependency injection .

The easy-to-use DI framework for C # is Ninject. They have a very clear tutorial on this.

References:

http://ninject.org/learn

http://blog.andresays.org/2010/10/dependency-injection-with-ninject-and-asp-net-mvc/

Good luck

+6
source

Source: https://habr.com/ru/post/1336458/


All Articles