Ninject和自定义控制器厂 [英] Ninject and Custom Controller Factory

查看:151
本文介绍了Ninject和自定义控制器厂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用MEF的ASP.NET MVC作为<一个证明href=\"http://blog.maartenballiauw.be/post/2009/06/17/Revised-ASPNET-MVC-and-the-Managed-Extensibility-Framework-(MEF).aspx\" rel=\"nofollow\">http://blog.maartenballiauw.be/post/2009/06/17/Revised-ASPNET-MVC-and-the-Managed-Extensibility-Framework-(MEF).aspx.

I'm using MEF with ASP.NET MVC as demonstrated at http://blog.maartenballiauw.be/post/2009/06/17/Revised-ASPNET-MVC-and-the-Managed-Extensibility-Framework-(MEF).aspx.

当我尝试使用Ninject,似乎没有什么被注入。我做了一些调试,当我恢复到原来的控制器工厂注射工作。

When I try to use Ninject, it seems that nothing gets injected. I did some debugging, and when I reverted to the original controller factory the injection worked.

有什么需要改变,或者是什么Ninject需要控制器工厂方面为它工作?

What needs to be changed, or what does Ninject need in terms of controller factories for it to work?

推荐答案

查看内特Kohari的Ninject。在GitHub上 Web.MVC项目。它使得在ASP.NET MVC项目Ninject整合非常容易的。

Check out Nate Kohari's Ninject.Web.MVC project on GitHub. It's makes Ninject integration with ASP.NET MVC projects extremely easy.

这篇关于Ninject和自定义控制器厂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆