Esempio n. 1
0
        public async Task <HttpResponseMessage> GetGeneral(HttpRequestMessage request, int id)
        {
            try
            {
                var generalInterview = await interviewService.GetGeneralInterviewsByCandidate(id).ConfigureAwait(false);

                var interviewDTO = Mapper.Map <ICollection <GeneralInterview>, ICollection <GeneralInterviewDTO> >(generalInterview);

                return(request.CreateResponse(HttpStatusCode.OK, interviewDTO));
            }
            catch (Exception ex)
            {
                logger.Error(ex, JsonConvert.SerializeObject(new { id }));

                return(request.CreateResponse(HttpStatusCode.InternalServerError));
            }
        }