views:

79

answers:

1

I am looking for the best approach to using NHibernate and MVC.net.

I have gone through http://www.codeproject.com/KB/architecture/NHibernateArchitecture.aspx

Someone has pointed to the use of Castle project Active record.

My aim is to eliminate the need for any nhibernate dependencies within my domain. I want a quick and easy domain model that is persistable with NHibernate.

Can I have a simple example and and some explanations please from which I can learn to use the castle project to build a simple application in MVC.net.

Thanks

+1  A: 
  1. There is no "best" approach to using NHibernate and asp.net mvc. NHibernate is a very flexible tool, you can use it in quite different ways depending on your project's needs.
  2. Castle ActiveRecord will not remove any dependencies on NHibernate in your domain. In fact, it will introduce more dependencies, as you'll need to mark your classes with some attributes.
  3. About sample projects using Castle ActiveRecord, see this question.
Mauricio Scheffer