forked from ninject/Ninject.Web.Mvc
-
Notifications
You must be signed in to change notification settings - Fork 0
MVC3
Remo Gloor edited this page Jul 17, 2013
·
10 revisions
Ninject.Web.Mvc3 provides a base infrastructure for MVC3 applications based on Ninject.
- Current release: http://code.google.com/p/ninject2/downloads/list?q=Ninject.Web.MVC3
- Latest build: https://teamcity.bbv.ch/viewLog.html?buildTypeId=bt39&buildId=lastSuccessful&tab=artifacts
The source code comes with a sample application that demonstrates most of the features of the MVC3 extension. It can be found here or download it with a git client.
- Setting up an MVC3 application
- Dependency Injection for Controllers
- Dependency Injection for filters
- Conditional bindings for filters
- Filter Configurations
- Injection of Filter Attributes
- Injection of Validators
- Unit of work pattern with NHibernate
Ninject.MVC3 also supports MVC 4 RTM (and RC) also as none of the ASP.NET MVC interfaces have changed significantly
Note that ASP.NET Web Api (which ships with MVC 4 but is actually on a parallel stack) interacts with dependency injection containers using a different interface hence requires additional work. This support is not yet in the production Ninject.MVC3
package at the present time. Here is a blog post showing one way of achieving integration in MVC 4 RTM