public async Task <ICollection <Vacancy> > Search(int skip, int amount, VacancySearchModel searchModel, VacancySortModel sortModel) { IQueryable <Vacancy> vacancies; vacancies = searchModel == null?vacancyRepository.ReadAll() : vacancyRepository.Find(searchModel); var res = Sorting(vacancies, sortModel).Skip(skip).Take(amount); var vacancyList = await Task.Run(() => res.ToList()); return(vacancyList); }