public async Task CleanUp() { IDataGateway dataGateway = new SQLServerGateway(); IConnectionStringData connectionString = new ConnectionStringData(); ITraditionalListingSearchRepository traditionalListingSearchRepository = new TraditionalListingSearchRepository(new SQLServerGateway(), new ConnectionStringData()); var accounts = await traditionalListingSearchRepository.GetAllListings(); // Delete Listing is not cooperating... place it here once its working. await DataAccessTestHelper.ReseedAsync("Listing", 0, connectionString, dataGateway); }
public async Task CleanUp() { IDataGateway dataGateway = new SQLServerGateway(); IConnectionStringData connectionString = new ConnectionStringData(); IUserAccountRepository userAccountRepository = new UserAccountRepository(dataGateway, connectionString); var accounts = await userAccountRepository.GetAllAccounts(); foreach (var account in accounts) { await userAccountRepository.DeleteAccountById(account.Id); } await DataAccessTestHelper.ReseedAsync("UserAccount", 0, connectionString, dataGateway); }
public async Task CleanUp() { IDataGateway dataGateway = new SQLServerGateway(); IConnectionStringData connectionString = new ConnectionStringData(); ILoginAttemptsRepository loginAttemptsRepository = new LoginAttemptsRepository(dataGateway, connectionString); var loginAttempts = await loginAttemptsRepository.GetAllLoginAttempts(); foreach (var loginAttempt in loginAttempts) { await loginAttemptsRepository.DeleteLoginAttemptsById(loginAttempt.Id); } await DataAccessTestHelper.ReseedAsync("LoginAttempts", 0, connectionString, dataGateway); }