Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Fließendes NHibernate MySQL-Batching

Ich habe dieses Paket verwendet und es hat bei mir funktioniert.

Unten die Konfiguration, die ich verwendet habe:

var cfg = new NHibernate.Cfg.Configuration();
cfg.SetProperty(NHibernate.Cfg.Environment.ConnectionProvider, "NHibernate.Connection.DriverConnectionProvider");
cfg.SetProperty(NHibernate.Cfg.Environment.ConnectionDriver, "NHibernate.Driver.MySqlDataDriver");
cfg.SetProperty(NHibernate.Cfg.Environment.Dialect, "NHibernate.Dialect.MySQLDialect");
cfg.SetProperty(NHibernate.Cfg.Environment.UseSecondLevelCache, "false");
cfg.SetProperty(NHibernate.Cfg.Environment.UseQueryCache, "false");
cfg.SetProperty(NHibernate.Cfg.Environment.GenerateStatistics, "false");
cfg.SetProperty(NHibernate.Cfg.Environment.CommandTimeout, "300");
cfg.SetProperty(NHibernate.Cfg.Environment.BatchSize, "1000");
cfg.SetProperty(NHibernate.Cfg.Environment.BatchStrategy,  typeof(MySqlClientBatchingBatcherFactory).AssemblyQualifiedName);