skip to the main content area of this page
Patterns and Practices

 

Spring.NET and NHibernate with ASP.NET MVC


Billy McCafferty provides code samples on how to leverage IoC and transaction management with Spring.NET and NHibernate with the ASP.NET MVC Framework to provide dependency injection of your controllers. He shows an example of specifying a Data Access Object ( DAO ) is his data access layer being injected into a controller.

You can find more examples of using other 3rd party open-source tools ( such as Castle Windsor and StructureMap ) in the MvcContrib Project. You can also check individual projects for samples. Autofac, another IoC Container, has extensions for the ASP.NET MVC Framework as well.

For an example of using Unity with the ASP.NET MVC Framework, you can check out my screencast: Unity IoC - Dependency Injection in ASP.NET MVC Framework Screencast

Hope this helps.

Dave


Tags: MVC, NHibernate, SpringFramework


RSS Syndication RSS Syndication

Twitter Microsoft .NET Web Developer Follow me on Twitter

Google+ Microsoft .NET Web Developer Follow me on Google+


Topics



 

Recent Links