I've been reading James Avery's blog for quite some time and I've got his 'Visual Studio.NET Hacks' book so I was pretty excited to sit in on this session (after hearing great things about NHibernate from Dave Donaldson).

I've played with ORMs off and on, but always end up reverting back to  rolling my own DAL and business objects.

Basically, James went over the pros and cons of DataReaders, Datasets, typed Datasets, Business Entities and finally ORMs.

NHibernate is the port of Java Hibernate.  It used XML mapping files to map between the physical database and your .NET classes.  There are CodeSmith templates available to auto-generate these mapping files.

You can dynamically load these files or, as James does, embed them as a resource in your assembly.

James talk was good, but there were some questions he couldn't answer.  One guy in the audience was concerned about NHibernates use of dynamic SQL, but James said that you would most like see a 4-8% difference in performance between using NHibernate and an app that uses stored procs.

He showed some cool stuff including the Hibernate Query Language.  He also showed an idea he stole from Scott Bellware which was a Repository class that basically wrapped all the cool NHibernate functionality into a very easy to use class (it used Generics to really simplify things).

Next session: 'Balancing Plan Drive and Agile Methodologies'