Ejemplo n.º 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;
        }
Ejemplo n.º 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();
 }