public QueueFixture() { try { var configuration = new DbMigrationsConfiguration { ContextType = typeof(QueueDataContext), MigrationsAssembly = typeof(QueueDataContext).Assembly, TargetDatabase = new DbConnectionInfo("QueueDataContext"), MigrationsNamespace = typeof(InitialCreate).Namespace, AutomaticMigrationDataLossAllowed = true }; var migrator = new DbMigrator(configuration); //Update / rollback to "MigrationName" migrator.Update("0"); migrator.Update(); _sut = new SqlQueueImpl(new Infrastructure.DatabaseContextFactory()); } catch (Exception ex) { if (Debugger.IsAttached) Debugger.Break(); Console.WriteLine(ex); throw; } }
public QueueFixture() { try { var configuration = new DbMigrationsConfiguration { ContextType = typeof(QueueDataContext), MigrationsAssembly = typeof(QueueDataContext).Assembly, TargetDatabase = new DbConnectionInfo("QueueDataContext"), MigrationsNamespace = typeof(InitialCreate).Namespace, AutomaticMigrationDataLossAllowed = true }; var migrator = new DbMigrator(configuration); //Update / rollback to "MigrationName" migrator.Update("0"); migrator.Update(); _sut = new SqlQueueImpl(new Infrastructure.DatabaseContextFactory()); } catch (Exception ex) { if (Debugger.IsAttached) { Debugger.Break(); } Console.WriteLine(ex); throw; } }