예제 #1
0
        public virtual void Init(string providerName)
        {
            ObjectFactory.ClearMaps();
            Broker.ClearPersistenceBroker();
            ObjectFactory.ClearMaps();
            IGentleProvider provider = ProviderFactory.GetProvider(providerName, "");

            Assert.AreEqual(provider.Name, providerName, "Wrong provider returned from factory!");
            sf     = provider.GetSqlFactory();
            broker = new PersistenceBroker(provider);
            sb     = new SqlBuilder(provider);
            // make sure analyzer errors are ignored for this test
            origLevel = GentleSettings.AnalyzerLevel;
            GentleSettings.AnalyzerLevel = AnalyzerLevel.None;
        }
예제 #2
0
 /// <summary>
 /// Retrieve an GentleSqlFactory instance for the database backend used.
 /// </summary>
 /// <returns></returns>
 public GentleSqlFactory GetSqlFactory()
 {
     return(provider.GetSqlFactory());
 }