/// <summary>
 /// Initializes NHibernate. Adds the mappings based on the assembly, initializes the session factory and opens
 /// a long-running global session
 /// </summary>
 private void InitializeNHibernate()
 {
     NHibernateConfiguration.Configure();
     NHibernateConfiguration.AddAssembly(typeof(Entity).Assembly);
     new SchemaUpdate(NHibernateConfiguration).Execute(false, true);
     SessionFactory = NHibernateConfiguration.BuildSessionFactory();
     GlobalSession  = SessionFactory.OpenSession();
 }