Example #1
0
        public JobInterview Get(long id)
        {
            var jobInterview = _repository.Get(id);

            if (jobInterview != null)
            {
                jobInterview.JobApplicant  = _jobApplicantService.Get(jobInterview.IdJobApplicant);
                jobInterview.UserTechnical = _userService.Get(jobInterview.IdUserTechnical);
                jobInterview.UserRecruiter = _userService.Get(jobInterview.IdUserRecruiter);

                if (jobInterview.IdJobFeedBack.HasValue)
                {
                    jobInterview.JobFeedBack = _jobFeedBackService.Get(jobInterview.IdJobFeedBack.Value);
                }
            }

            return(jobInterview);
        }
        public ActionResult <JobApplicant> Get(long id)
        {
            try
            {
                var result = _jobApplicantService.Get(id);

                if (result == null)
                {
                    return(NotFound());
                }
                else
                {
                    return(Ok(result));
                }
            }
            catch (Exception ex)
            {
                return(UnprocessableEntity(ex));
            }
        }