Esempio n. 1
0
        public IEnumerable <VacancyDto> GetVacanciesByCompanyId(int companyId, string searchString)
        {
            var vacancies = _mapper.Map <IEnumerable <VacancyViewModel>, IEnumerable <VacancyDto> >(
                _vacancyRepository.GetVacanciesByCompanyId(companyId, searchString)).ToList();

            foreach (var vacancy in vacancies)
            {
                vacancy.Interview = _interviewService.GetInterviewByVacancyId(vacancy.Id);
            }

            return(vacancies);
        }