//Locking mechanism used for MS SQL Server requires database to have Snapshot isolation level enabled (off by default).
 // We do it using migrations - and direct SQL connector to run special SQL.
 public override void RegisterMigrations(Data.Upgrades.DbMigrationSet migrations)
 {
     if (migrations.ServerType == Data.Driver.DbServerType.MsSql) {
     migrations.AddPostUpgradeAction("1.2.0.0", "EnableSnapshot", "Enable snapshot isolation for database.", EnableSnapshotIsolation);
       }
 }
Esempio n. 2
0
 public override void RegisterMigrations(Data.Upgrades.DbMigrationSet migrations)
 {
     // MS SQL - special case; we have to use Snapshot isolation level for read transaction.
       // For this, we have to explicitly enable it for the database. We do it using migration
       if (migrations.ServerType == Data.Driver.DbServerType.MsSql)
     migrations.AddPostUpgradeAction("1.0.0.0", "EnableSnapshot", "Enable snapshot isolation", EnableSnapshotIsolation);
 }