implement NHibernate