Ryan LanciauxNew Media Mercenary

RhinoCommons, NHibernate and ASP.NET MVC Part 1 - Setup

May 19, 2008 by ryan

After my last post about the unit of work with NHibernate, Chad Myers mentioned that I should take a look at Ayende's Rhino Commons (because the Unit of Work stuff is already being handled). Since I am not a big fan of reinventing the wheel I decided I would give it a shot. There's going to be another post in the near future about how to get Rhino Commons, Castle ActiveRecord and ASP.NET MVC working together but for now, it would be good to make sure all the necessary components are installed on your machine.

  1. Make sure you have a subversion client -- Tortoise SVN or the command prompt is what I use but any subversion client should be fine.
  2. If you don't already have Nant installed on your machine download and install that
  3. Download and build the following (Ayende mentions, the trick is not opening in Visual Studio):
  4. Next you're going to want to setup the NHibernate Query Generator (we're going to use Linq to NHibernate in a later example but for now get this installed). This should be a part of the Rhino-tools package but if you want you can download the binaries. Then setup the application as an external tool in Visual Studio (my settings are posted below). see James Hollingworth's post for more info
    • Command: C:\program files\nhqg\NHQG.exe
    • Arguments: /Lang:cs /InputFilePattern:$(BinDir)/ProductModelActiveRecord.dll /OutputDirectory:$(ProjectDir)/Queries /BaseNamespace:Queries
    • Initial Directory: $(TargetDir)
  5. Finally make sure you're running the preview 3 drop of the ASP.NET MVC Framework -- you can get that here from CodePlex
You should now have everything setup. It may be good to take a look at the Exesto application in the rhino-tools\SampleApplications directory to get an introduction to the Rhino-tools / binsor / castle settings that we'll be looking at later on. Finally, if you are not familiar with the ASP.NET MVC Framework take a look Fredrik Normen's step by step guide. In the next couple of days, I will be posting how to wire these tools together for quick web application development. Stay Tuned.

kick it on DotNetKicks.com



Related posts

Comments

May 20. 2008 13:32

Scott Sanzenblogger

Per your second sentence, I have one word for you: ISNULL Smile

Scott Sanzenblogger

May 20. 2008 19:31

Travis

Looking forward to this series. Thanx!!!!

Travis

July 10. 2008 00:53

Mike

That gonna be great, looking forward for this!

Mike

July 29. 2008 18:01

Steve

It took me a while to figure this out so I thought I'd share it with anyone following along with this. The build scripts for Castle and Rhino Tools require NUnit to be on the path variable. Just add the bin folder of the NUnit installation to your path variable which in Vista can be found in
Control Panel -> System -> Advanced System Settings -> Environment Variables

Even after doing this the NUnit console crashed while testing the Castle project so if this happens run without tests
nant -D:common.testrunner.enabled=false

Steve

October 6. 2008 17:54

TASARIM

This great thank you for the series. Reading it makes a lot of things clear

TASARIM

March 4. 2009 21:37

Pankaj

Nice post..good work...thanks for sharing.!!!

Pankaj

Comments are closed




© 2008 Ryan Lanciaux :: powered by BlogEngine.NET