Monday, May 30, 2016

Configure MVC 5 with Ninject

Configure MVC 5 with Ninject:

How to get Ninject working with MVC 5

Install-Package Ninject.MVC5  
This will create the file in your solution:
Then to wire up an interface for resolution to a concreate implementation, just:
private static void RegisterServices(IKernel kernel) {  
Unity:Modify UnityConfig.cs to register serviceAdd this to App_start: UnityConfig.RegisterComponents();