使用ninject为Web Api注入HttpControllerContext的绑定

时间:2012-08-06 05:45:08

标签: ninject asp.net-web-api

我有一个服务,HttpControllerContext用于构造函数注入。这有什么约束力?绑定在WebActivator下的NinjectWebCommon文件中设置。

通过绑定,我的意思是:

kernel.Bind<IUserService>().To<UserService>();
kernel.Bind<HttpControllerContext>().To</* ??? */ >(); //Whats the binding?

0 个答案:

没有答案