Beispiel #1
0
        public async Task <IActionResult> Complete(int id)
        {
            var interview = await _interviewService.GetInterviewAsync(id);

            var exam = await _interviewService.GetExamAsync(interview.ExamId);

            var candidate = await _userService.GetCandidateAsync(interview.CandidateId);

            if (interview == null || exam == null || candidate == null)
            {
                return(RedirectToAction(nameof(HomeController.Error)));
            }

            var viewModel = ViewModelBuilder.GetCompleteViewModel(interview, exam, candidate);

            return(View(viewModel));
        }