Exemplo n.º 1
0
 public static void RepairDb(string fileName)
 {
     SqlCeEngine engine = new SqlCeEngine(TrialDataContext.GetConnectionString(fileName));
     if (!engine.Verify())
     {
         engine.Repair(null, RepairOption.RecoverAllOrFail);
     }
 }
Exemplo n.º 2
0
 void MigrateIfRequired(string fullFilename)
 {
     if (_baksForgoingMigration == null)
     {
         _baksForgoingMigration = new List <string>();
     }
     if (!_baksForgoingMigration.Contains(fullFilename))
     {
         if (!CodeBasedMigration.ApplyPendingMigrations <BlowTrial.Migrations.TrialData.TrialDataConfiguration>(TrialDataContext.GetConnectionString(fullFilename), ContextCeConfiguration.ProviderInvariantName))
         {
             _baksForgoingMigration.Add(fullFilename);
         }
     }
 }
Exemplo n.º 3
0
 internal void SeedTest(BlowTrial.Domain.Providers.TrialDataContext context)
 {
     Seed(context);
 }