I am using the ninject mvc3 plugin with my web api application. I have a binding that looks like:
public class NinjectResolver : NinjectScope, IDependencyResolver
private readonly IKernel _kernel;
public NinjectResolver(IKernel kernel)
_kernel = kernel;
public IDependencyScope BeginScope()
return new NinjectScope(_kernel.BeginBlock());
I never could get it to work properly, and I am not sure why. My guess is it has something to do with MVC4 integration being a bit immature at the moment.
As an alternative I am using:
This seems to work, but I am not too happy with it.