Example #1
0
        public IEnumerable <RatingDto> GetInterviewRatings(int applicantId)
        {
            var ratings          = _mapper.Map <IEnumerable <RatingViewModel>, IEnumerable <RatingDto> >(_ratingRepository.GetInterviewRatings());
            var interviewRatings = ratings.ToList();

            foreach (var rating in interviewRatings)
            {
                var vacancy   = _vacancyService.GetVacancyById(rating.VacancyId);
                var interview = _interviewService.GetInterviewById(rating.InterviewId);

                rating.CompanyName = vacancy.CompanyName;
                rating.VacancyName = vacancy.Title;
                rating.ApplicantId = interview.ApplicantId;
            }

            return(interviewRatings.Where(x => x.ApplicantId == applicantId).OrderByDescending(x => x.EstimationSum));
        }
Example #2
0
 public IActionResult GetInterviewById(int interviewId)
 {
     return(Ok(_interviewService.GetInterviewById(interviewId)));
 }