protected override void Configure(Cfg.Configuration configuration) { configuration.SetProperty(Cfg.Environment.BatchSize, "10"); configuration.SetProperty(Cfg.Environment.SqlExceptionConverter, typeof(MSSQLExceptionConverterExample).AssemblyQualifiedName); }
protected override void Configure(Cfg.Configuration configuration) { if (Dialect is MsSql2000Dialect) { configuration.SetProperty( Cfg.Environment.SqlExceptionConverter, typeof(MSSQLExceptionConverterExample).AssemblyQualifiedName); } if (Dialect is Oracle8iDialect) { configuration.SetProperty( Cfg.Environment.SqlExceptionConverter, typeof(OracleClientExceptionConverterExample).AssemblyQualifiedName); } if (Dialect is PostgreSQLDialect) { configuration.SetProperty( Cfg.Environment.SqlExceptionConverter, typeof(PostgresExceptionConverterExample).AssemblyQualifiedName); } if (Dialect is FirebirdDialect) { configuration.SetProperty( Cfg.Environment.SqlExceptionConverter, typeof(FbExceptionConverterExample).AssemblyQualifiedName); } }
public void Config(IPersistenceUnitCfg puCfg, Cfg.Configuration configuration) { if (puCfg.Name == MockPersistenceUnitCfg.MockPUName) { configuration.SetProperty("connection.provider", "NHibernate.Connection.DriverConnectionProvider"); configuration.SetProperty("connection.driver_class", "NHibernate.Driver.SqlClientDriver"); configuration.SetProperty("connection.connection_string", "Server=(local);initial catalog=NHibernateBurrow;Integrated Security=SSPI"); configuration.SetProperty("dialect", "NHibernate.Dialect.MsSql2005Dialect"); configuration.SetProperty("adonet.batch_size", testAdoBatchSize.ToString()); } }
protected override void AddMappings(Cfg.Configuration configuration) { // Set some properties that must be set before the mappings are added. // (The overridable Configure(cfg) is called AFTER AddMappings(cfg).) configuration.SetProperty(Cfg.Environment.PreferPooledValuesLo, _preferLo.ToString().ToLower()); base.AddMappings(configuration); }
public void CanBeSetNhCoreWay() { var nhConfiguration = new Cfg.Configuration(); nhConfiguration.SetProperty("nhibernate.envers.store_data_at_delete", "true"); nhConfiguration.IntegrateWithEnvers(); AuditConfiguration.GetFor(nhConfiguration).GlobalCfg.StoreDataAtDelete .Should().Be.True(); }
public static Cfg.Configuration OverrideSettingsFromEnvironmentVariables(this Cfg.Configuration configuration) { foreach (var nhProperty in configuration.Properties.ToArray()) { var envVar = System.Environment.GetEnvironmentVariable(nhProperty.Key); if (envVar != null) { configuration.SetProperty(nhProperty.Key, envVar); } } return(configuration); }
protected override void Configure(Cfg.Configuration configuration) { base.Configure(configuration); configuration.SetProperty(Cfg.Environment.ShowSql, "true"); }
//protected override bool AppliesTo(Dialect.Dialect dialect) //{ // // this test work only with Field interception (NH-1618) // return FieldInterceptionHelper.IsInstrumented( new Person() ); //} protected override void Configure(Cfg.Configuration configuration) { configuration.SetProperty(Environment.MaxFetchDepth, "2"); configuration.SetProperty(Environment.UseSecondLevelCache, "false"); }
protected override void Configure(Cfg.Configuration configuration) { configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true"); }
public void SetUserValue(Cfg.Configuration nhibernateProperties, T value) { nhibernateProperties.SetProperty(_key, ToString(value)); }
protected override void Configure(Cfg.Configuration configuration) { configuration.SetProperty("hbm2ddl.keywords", "auto-quote"); }
protected override void Configure(Cfg.Configuration configuration) { base.Configure(configuration); configuration.SetProperty("linqtohql.generatorsregistry", "NHibernate.Test.NHSpecificTest.NH2318.ExtendedLinqtoHqlGeneratorsRegistry, NHibernate.Test"); }
public static Cfg.Configuration CurrentSessionContextBinder(this Cfg.Configuration configuration, string currentSessionContextBinderClass) { return(configuration.SetProperty(CurrentSessionContextBinderClass, currentSessionContextBinderClass)); }
protected override void Configure(Cfg.Configuration configuration) { base.Configure(configuration); _originalProxyFactoryFactory = Cfg.Environment.BytecodeProvider.ProxyFactoryFactory.GetType().FullName; configuration.SetProperty(Cfg.Environment.ProxyFactoryFactoryClass, typeof(DefaultProxyFactoryFactory).FullName); }
protected override void Configure(Cfg.Configuration configuration) { //get rid of the overhead supporting distr trans configuration.SetProperty(Cfg.Environment.TransactionStrategy, typeof(AdoNetTransactionFactory).FullName); }
protected override void Configure(Cfg.Configuration configuration) { configuration.SetProperty(Cfg.Environment.UseQueryCache, "false"); configuration.SetProperty(Cfg.Environment.UseSecondLevelCache, "false"); }