internal DataManufacturer() { _configurationManager = new ConfigurationManager(); var userMappers = new UserMappers(); _userRepository = new UserRepository(_configurationManager, userMappers); var candidateMappers = new CandidateMappers(); _candidateWriteRepository = new CandidateRepository(_configurationManager, candidateMappers); _vacancyDataProvider = new FakeVacancyDataProvider(); var applicationMappers = new ApplicationMappers(); _applicationRepository = new ApplicationRepository(_configurationManager, applicationMappers); }
public MigrationProcessor(IConfigurationService configurationService, ILogService logService) { _logService = logService; var configuration = configurationService.Get <MigrateFromFaaToAvmsPlusConfiguration>(); //Ensure date precision is honoured Dapper.SqlMapper.AddTypeMap(typeof(DateTime), System.Data.DbType.DateTime2); var sourceDatabase = new GetOpenConnectionFromConnectionString(configuration.SourceConnectionString); var targetDatabase = new GetOpenConnectionFromConnectionString(configuration.TargetConnectionString); var genericSyncRespository = new GenericSyncRespository(_logService, sourceDatabase, targetDatabase); _syncRepository = new SyncRepository(targetDatabase); var applicationMappers = new ApplicationMappers(_logService); _candidateMigrationProcessor = new CandidateMigrationProcessor(new CandidateMappers(_logService), _syncRepository, genericSyncRespository, targetDatabase, configurationService, _logService); _traineeshipApplicationsMigrationProcessor = new VacancyApplicationsMigrationProcessor(new TraineeshipApplicationsUpdater(_syncRepository), applicationMappers, genericSyncRespository, sourceDatabase, targetDatabase, configurationService, _logService); _apprenticeshipApplicationsMigrationProcessor = new VacancyApplicationsMigrationProcessor(new ApprenticeshipApplicationsUpdater(_syncRepository), applicationMappers, genericSyncRespository, sourceDatabase, targetDatabase, configurationService, _logService); _auditMigrationProcessor = new AuditMigrationProcessor(_syncRepository, targetDatabase, configurationService, _logService); _logService.Info("Initialisation"); }