本文整理汇总了C#中Cfg.SetProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Cfg.SetProperty方法的具体用法?C# Cfg.SetProperty怎么用?C# Cfg.SetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cfg
的用法示例。
在下文中一共展示了Cfg.SetProperty方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Configure
protected override void Configure(Cfg.Configuration configuration)
{
configuration.SetProperty(Cfg.Environment.BatchSize, "10");
configuration.SetProperty( Cfg.Environment.SqlExceptionConverter,
typeof (MSSQLExceptionConverterExample).AssemblyQualifiedName);
}
示例2: Configure
//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.ProxyFactoryFactoryClass,
typeof(NHibernate.ByteCode.Castle.ProxyFactoryFactory).AssemblyQualifiedName);
configuration.SetProperty(Environment.MaxFetchDepth, "2");
configuration.SetProperty(Environment.UseSecondLevelCache, "false");
}
示例3: Configure
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);
}
}
示例4: Config
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());
}
}
示例5: AddMappings
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);
}
示例6: Configure
protected override void Configure(Cfg.Configuration configuration)
{
configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true");
}
示例7: Configure
protected override void Configure(Cfg.Configuration configuration)
{
configuration.SetProperty(Cfg.Environment.ShowSql, "true");
base.Configure(configuration);
}
示例8: Configure
protected override void Configure(Cfg.Configuration configuration)
{
//get rid of the overhead supporting distr trans
configuration.SetProperty(Cfg.Environment.TransactionStrategy, typeof(AdoNetTransactionFactory).FullName);
}
示例9: Configure
//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");
}