private void ConfigureNHibernate() { if (IsProduction) { ImmediateConfigureNHibernate(); return; } var nhCache = new NHibernateCache( GetRootedPath(NHibernateCacheFile), this.GetType().Assembly); var nhConfig = nhCache.Get(); if (nhConfig != null) { Do.SetNHibernateConfig(nhConfig); } else { ImmediateConfigureNHibernate(); nhCache.Set(Do.GetNHibernateConfig()); } }