protected override void DoSetUp() { DropSagaTables(); persister = new SqlServerSagaPersister(GetOrCreateConnection, SagaIndexTableName, SagaTableName); persister.EnsureTablesAreCreated(); }
public IStoreSagaData CreatePersister() { const string sagaTableName = "test_sagas"; const string sagaIndexTableName = "test_saga_index"; var sqlServerSagaPersister = new SqlServerSagaPersister(ConnectionStrings.SqlServer, sagaIndexTableName, sagaTableName); sqlServerSagaPersister.EnsureTablesAreCreated(); DeleteRows(sagaTableName); DeleteRows(sagaIndexTableName); return sqlServerSagaPersister; }
protected override void DoSetUp() { // ensure the two tables are dropped try { ExecuteCommand("drop table " + SagaTableName); } catch { } try { ExecuteCommand("drop table " + SagaIndexTableName); } catch { } persister = new SqlServerSagaPersister(GetOrCreateConnection, SagaIndexTableName, SagaTableName); persister.EnsureTablesAreCreated(); }