public IActionResult GetAllPatient() { try { _logger.LogInformation("GetAllPatient Called"); var patients = _patientInfoRepository.GetPatients(); var result = Mapper.Map <IEnumerable <PatientWithoutExaminationDTO> >(patients); if (result == null) { return(StatusCode(500, "no result")); } return(Ok(result)); } catch (Exception ex) { return(StatusCode(500, ex.Message.ToString())); } }