示例#1
0
        public async Task <IActionResult> Get(int id)
        {
            if (id <= 0)
            {
                NotifyError("id inexistente");
                return(CustomResponse(statusCode: StatusCodes.Status400BadRequest));
            }

            Exam exam = await _examService.FindByIdAsync(id);

            if (exam == null)
            {
                return(CustomResponse(statusCode: StatusCodes.Status400BadRequest));
            }

            return(Ok(_mapper.Map <Exam, ExamDTO>(exam)));
        }