NHibernate can seem like a daunting library to set up. The configuration can get quite complicated—XML mappings, code mappings, mapping conventions, dialects, logging, etc. Sometimes you just want to get something up and running to test out a query or play around with a database other than your primary one. In this post, I’ll show you how to get up and running with NHibernate in about 5 minutes and in around 50 lines of code in LINQPad.
This assumes you already have a database configured and ready to create new tables and connect to with NHibernate.