コード例 #1
0
ファイル: NHConfiguration.cs プロジェクト: aozora/arashi
        /// <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;
        }
コード例 #2
0
ファイル: SqlLiteHelper.cs プロジェクト: aozora/arashi
 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();
 }