ASP.NET Web API binding with ninject

I asked Brad Wilson about this and it has changed in MVC4 RC.

GlobalConfiguration.Configuration.ServiceResolver has been moved to GlobalConfiguration.Configuration.DependencyResolver

Use this implementation to create a Ninject DependencyResolver for your Web Api:
https://gist.github.com/2417226

In NinjectWebCommon.cs:

// Register Dependencies
RegisterServices(kernel);

// Set Web API Resolver
GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernel);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)