Exemple #1
0
        /// <summary>
        /// 	Initializes the <see cref = "NHConfiguration" /> class.
        /// </summary>
        static NHConfiguration()
        {
            section = ConfigurationManager.GetSection ( "dexter.nhibernate.core.configurationSection" ) as NHConfigurationSection;

            if ( section == null )
                throw new ConfigurationErrorsException ( "Maintenance section not found in the configuration file." );

            ConnectionString = ConfigurationManager.ConnectionStrings [ section.ConnectionStringName ].ConnectionString;
        }
Exemple #2
0
 public void FixtureSetUp()
 {
     NHibernate.NHConfigurationSection section = new NHibernate.NHConfigurationSection();
      section.ConnectionStringName = SqlLiteConnectionString;
      section.DatabaseType = "SqlLite";
      RestoreNHibernateSessionManager = NHibernate.NHelper.OverrideSessionFactory(section);
      if (RecreateDb)
     NHibernate.NHelper.InitializeSchema();
 }