public SessionProvider(INHConfigurationBuilder configBuilder) { Stopwatch watch = _msg.DebugStartTiming(); Configuration configuration = configBuilder.GetConfiguration(); _sessionFactory = configuration.BuildSessionFactory(); _msg.DebugStopTiming( watch, "Configured NHibernate and created session factory using the following configuration: {0}", configuration); }
public SessionProvider(INHConfigurationBuilder configBuilder) { Stopwatch watch = _msg.DebugStartTiming(); try { Configuration configuration = configBuilder.GetConfiguration(); _sessionFactory = configuration.BuildSessionFactory(); _msg.DebugStopTiming( watch, "Successfully configured NHibernate and created session factory."); } catch (Exception e) { // Do not throw - in some applications the DDX is optional (such as field admin). _msg.Debug("Failed to create NHibernate session factory.", e); _sessionFactoryErrorMessage = e.Message; } }
public DbScript(INHConfigurationBuilder configurationBuilder) { _configuration = configurationBuilder.GetConfiguration(); _sessionFactory = _configuration.BuildSessionFactory(); }
public SchemaCreator([NotNull] INHConfigurationBuilder configurationBuilder) { _configuration = configurationBuilder.GetConfiguration(); _sessionFactory = _configuration.BuildSessionFactory(); }