开发者

Created a class that inherits from NinjectModule, where to load now?

开发者 https://www.devze.com 2022-12-09 20:04 出处:网络
After creating a class that inherits from NinjectModule, and overriding t开发者_StackOverflowhe Load() method with all my binding calls, where do I setup ninject in my asp.net web application? (MVC)

After creating a class that inherits from NinjectModule, and overriding t开发者_StackOverflowhe Load() method with all my binding calls, where do I setup ninject in my asp.net web application? (MVC)

Is it a httpmodule that I have to create? global.asax?


UPDATE NB see comment on question - this only makes sense for MVC if using a very old Ninject (2 or earlier) and a very old MVC (2 or earlier)


There's a NinjectHttpApplication you derive from which auto-injects pages.

See Does anyone know of a good guide to get Ninject 2 working in ASP.NET MVC?

0

精彩评论

暂无评论...
验证码 换一张
取 消