public ApplicationUpdater(string collectionName, IConfigurationService configurationService, ILogService logService) { _logService = logService; var configuration = configurationService.Get <MigrateFromFaaToAvmsPlusConfiguration>(); _targetDatabase = new GetOpenConnectionFromConnectionString(configuration.TargetConnectionString); _applicationMappers = new ApplicationMappers(_logService); _vacancyApplicationsRepository = new VacancyApplicationsRepository(collectionName, configurationService, logService); _candidateRepository = new CandidateRepository(_targetDatabase); _destinationApplicationRepository = new ApplicationRepository(_targetDatabase); _destinationApplicationHistoryRepository = new ApplicationHistoryRepository(_targetDatabase, _logService); _schoolAttendedRepository = new SchoolAttendedRepository(_targetDatabase); }
public VacancyApplicationsMigrationProcessor(IVacancyApplicationsUpdater vacancyApplicationsUpdater, IApplicationMappers applicationMappers, IGenericSyncRespository genericSyncRespository, IGetOpenConnection sourceDatabase, IGetOpenConnection targetDatabase, IConfigurationService configurationService, ILogService logService) { _vacancyApplicationsUpdater = vacancyApplicationsUpdater; _applicationMappers = applicationMappers; _genericSyncRespository = genericSyncRespository; _targetDatabase = targetDatabase; _logService = logService; _vacancyRepository = new VacancyRepository(targetDatabase); _candidateRepository = new CandidateRepository(targetDatabase); _sourceApplicationRepository = new ApplicationRepository(sourceDatabase); _sourceApplicationHistoryRepository = new ApplicationHistoryRepository(sourceDatabase, _logService); _sourceSubVacancyRepository = new SubVacancyRepository(sourceDatabase); _destinationApplicationRepository = new ApplicationRepository(targetDatabase); _destinationApplicationHistoryRepository = new ApplicationHistoryRepository(targetDatabase, _logService); _schoolAttendedRepository = new SchoolAttendedRepository(targetDatabase); _destinationSubVacancyRepository = new SubVacancyRepository(targetDatabase); _vacancyApplicationsRepository = new VacancyApplicationsRepository(_vacancyApplicationsUpdater.CollectionName, configurationService, logService); _updateVacancyApplicationsRepository = new UpdateVacancyApplicationsRepository(_vacancyApplicationsUpdater.CollectionName, configurationService, logService); }
public CandidateMigrationProcessor(ICandidateMappers candidateMappers, SyncRepository syncRepository, IGenericSyncRespository genericSyncRespository, IGetOpenConnection targetDatabase, IConfigurationService configurationService, ILogService logService) { _candidateMappers = candidateMappers; _syncRepository = syncRepository; _genericSyncRespository = genericSyncRespository; _targetDatabase = targetDatabase; _logService = logService; _vacancyRepository = new VacancyRepository(targetDatabase); _localAuthorityRepository = new LocalAuthorityRepository(targetDatabase); _candidateRepository = new CandidateRepository(targetDatabase); _schoolAttendedRepository = new SchoolAttendedRepository(targetDatabase); _candidateHistoryRepository = new CandidateHistoryRepository(targetDatabase); _candidateUserRepository = new CandidateUserRepository(configurationService, _logService); _userRepository = new UserRepository(configurationService, logService); var configuration = configurationService.Get <MigrateFromFaaToAvmsPlusConfiguration>(); _anonymiseData = configuration.AnonymiseData; }
public CandidateUserUpdater(IConfigurationService configurationService, ILogService logService) { _logService = logService; var configuration = configurationService.Get <MigrateFromFaaToAvmsPlusConfiguration>(); _targetDatabase = new GetOpenConnectionFromConnectionString(configuration.TargetConnectionString); _candidateMappers = new CandidateMappers(logService); _candidateUserRepository = new CandidateUserRepository(configurationService, logService); _userRepository = new UserRepository(configurationService, logService); _candidateRepository = new CandidateRepository(_targetDatabase); _schoolAttendedRepository = new SchoolAttendedRepository(_targetDatabase); _candidateHistoryRepository = new CandidateHistoryRepository(_targetDatabase); _applicationRepository = new ApplicationRepository(_targetDatabase); _vacancyLocalAuthorities = new Lazy <IDictionary <string, int> >(() => new VacancyRepository(_targetDatabase).GetAllVacancyLocalAuthorities()); _localAuthorityCountyIds = new Lazy <IDictionary <int, int> >(() => new LocalAuthorityRepository(_targetDatabase).GetLocalAuthorityCountyIds()); _anonymiseData = configuration.AnonymiseData; }