How to implement Dependency Injection Using Ninject in MVC?
We have a requirement for implementing Dependency Injection using Ninject (third party tool) in MVC application. so how it should be done?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Mukesh KumarRank #119 · 18.2K reputationPosted Sep 27, 2015, 10:40 PM EDT
First you just need to install Ninject in Visual studio from the package manager console run this command:
This will add a class to
App_Start/NinjectWebCommon.csIf you look near the bottom there is a RegisterServices method.
You simply add the code from your question there i.e.
Sujeet SumanRank #790 · 2.9K reputationPosted Sep 27, 2015, 10:55 PM EDT