NHibernate implementation.