private static void CreateNewVacanciesProgress(Candidate destination, CandidateDTO source, IRepository<Vacancy> vacancyRepo) { source.VacanciesProgress.Where(x => x.IsNew()).ToList().ForEach(newVacancyStageInfo => { var toDomain = new VacancyStageInfo(); toDomain.Update(vacancyRepo.GetByID(newVacancyStageInfo.VacancyId.Value), newVacancyStageInfo); destination.VacanciesProgress.Add(toDomain); }); }
private static void CreateNewVacanciesProgress(Vacancy destination, VacancyDTO source) { source.CandidatesProgress.Where(x => x.IsNew()).ToList().ForEach(newVacancyStageInfo => { var toDomain = new VacancyStageInfo(); toDomain.Update(destination, newVacancyStageInfo); destination.CandidatesProgress.Add(toDomain); }); }