It seems like every single project we begin as developers, no matter how simple, requires some sort of storage. Sometimes, this is a simple collection of values in an XML file or a key-value pair in a properties file.
However, more often than not, we need to have access to larger volumes of data represented in multiple related database tables. In either case, we are generally forced to reinvent the wheel; to create new data retrieval and storage methods for each piece of data that we want to access. Enter NHibernate.
In this chapter, we will discuss: