public async Task <ResponseMessageResult <VacancyViewModel> > GetVacancyById(Guid id) { var response = new ResponseMessageResult <VacancyViewModel>(); var vacancy = await _vacancyRepository.GetAsync(id); if (vacancy == null) { response.SetStatus(HttpStatusCode.NotFound, $"Vacancy [{id}] was not found!"); return(response); } response.Content = _mapper.Map <VacancyViewModel>(vacancy); return(response); }