views:

1188

answers:

4

Where can I find a good NHibernate and ASP.NET MVC Reference Application? I downloaded S#arp and this seemed to be a lot more than I needed (IOC and CodeGen via T4). I might work my way up to this later, but I need something smaller at first.

Any simple examples? I just want to pick up how NHibernate Session handling works in ASP.NET MVC. And maybe how some simple query scenarios work. Still trying to grasp how a SELECT DISTINCT would be done in NHibernate and through to the View via the ViewData.

+1  A: 

It's not a full sample application or anything but it's a pretty well designed ASP.NET MVC project framework written around DDD/nHibernate etc.

http://code.google.com/p/sharp-architecture/

Chad Moran
Actually #arc comes with two reference applications.
Jonathan Parker
Sharp Architecture, what I linked to.
Chad Moran
+10  A: 

I would try to tackle them independently.

Before Billy McCafferty wrote sharp-architecture he wrote, what I think is, a must read on codeproject about best practices with NHibernate. Also, I have just discovered some DimeCasts(by Kyle Baley) under the MVC tag that are very good.

Rob Conery created the ASP.NET MVC Storefront video series which he goes over a lot of patterns and practices. The backend written is using Linq to SQL but can be adapted with LinQ to NHibernate. More recently he has also done a video series on TekPub - NHibernate with Ayende Rahien. Lastly (for NHibernate) there is the Summer of NHibernate

The S# arch source itself now comes with a sample projects as well.

Finally, there is Code Camp Server that is built with MVC.Net and NHibernate and uses pretty much every open source tool you can think of...

sidenote

If your interested in getting rid of those annoying XML files when using NHibernate you might also want to look at fluent.

cgreeno
+1 Thanks for the code project link. This helps even though this isn't MVC, it is WebForms with NHibernate, and uses and interesting method of managing the NHibernate Session.
tyndall
ya it is quite interesting. I also got a lot out of the MVC Storefront series. Esp the episode showing the uses of structure map...
cgreeno
+1 for StoreFront. That's an awesome series!
Ruben Steins
I agree. I will get a lot out of looking at the Storefront code and videos.
tyndall
+3  A: 

Code Camp Server

Tim Scott
A: 

Here is another one:

http://dataguidance.codeplex.com/

Andrew Peters