Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
创建一个从 NinjectModule 继承的类,并用我的所有绑定调用覆盖 Load() 方法后,我应该在我的 asp.net Web 应用程序中的哪里设置 ninject?(MVC)
它是我必须创建的httpmodule吗?全球.asax?
更新 NB 查看对问题的评论 - 如果使用非常旧的 Ninject(2 或更早版本)和非常旧的 MVC(2 或更早版本),这仅对 MVC 有意义
您可以NinjectHttpApplication从中派生自动注入页面。
NinjectHttpApplication
请参阅是否有人知道让 Ninject 2 在 ASP.NET MVC 中工作的好指南?