Journey of Dependency Injection
Asp.Net Core is one of the gems (I would say) created by Microsoft that has simplified a lot of things and provides a whole lot of things by default out of the box. It based on dot net core which provides inherent capability to run cross platform but to ease out developer life several optimizations were done to enhance productivity.
One such feature is Dependency Injection. Although lately, but Microsoft did included dependency injection as a part of the core product. I have been working Asp.Net MVC since 2010 (or 2011) and started DI with Ninject which was (or is) a wonderful project. During the time I crossed paths with Unity and Autofac during different projects, but more or less the approach remain same. Create a container system, create ‘sort of’ controller factories and then register dependencies. But during all this time one thing that remain constant was additional overhead of creating this shit. So it was a moment of joy (atleast for me) when i say this in recent versions of MVC. And most importantly it is quite stable and performs well out of the box.
Continue reading