16

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.

Community
  • 1
  • 1
BuddyJoe
  • 69,735
  • 114
  • 291
  • 466
  • Is it just me? but I get errors when trying to download the source for Code Camp Server. – BuddyJoe Feb 19 '09 at 03:31
  • no I got the source alright.... You need to have an SVN client installed. You can find one here http://tortoisesvn.net/downloads for windows. – cgreeno Feb 19 '09 at 10:47
  • It is by far the BEST svn client for windows - there is also a Visual Studio add in that will integrate with TortoiseSVN called http://www.visualsvn.com/ – cgreeno Feb 19 '09 at 10:49
  • I was using TortoiseSVN and wasn't able to download. Maybe its my companies annoying firewall/proxy. I think the new one they just put in looks for WebDAV-ish traffic over port 80. – BuddyJoe Feb 19 '09 at 17:25

6 Answers6

14

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
  • 31,943
  • 7
  • 66
  • 87
  • +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. – BuddyJoe Feb 19 '09 at 04:06
  • 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 Feb 19 '09 at 09:36
  • I agree. I will get a lot out of looking at the Storefront code and videos. – BuddyJoe Feb 19 '09 at 17:23
3

Code Camp Server

Tim Scott
  • 15,106
  • 9
  • 65
  • 79
  • Not the easiest project to digest for those new to either MVC or NHibernate. It also relies heavily on command processing, which adds to the learning curve. Is there a guide to walking through the source? – Merritt Apr 08 '11 at 20:24
1

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
  • 12,834
  • 2
  • 50
  • 72
1

you can check these websties

http://nhibernateasp.codeplex.com

http://blog.bobcravens.com/2010/07/using-nhibernate-in-asp-net-mvc/

makim
  • 3,154
  • 4
  • 30
  • 49
Deepakmahajan
  • 856
  • 1
  • 11
  • 23
0

Here is another one:

http://dataguidance.codeplex.com/

Andrew Peters
  • 11,135
  • 4
  • 37
  • 34
0

BuddyJoe, you can I find a good NHibernate and ASP.NET MVC Reference Application NHibernate Mvc Code nhibernatetutorial.com

Community
  • 1
  • 1
Manoj Patil
  • 970
  • 1
  • 10
  • 19