public ActionResult <DiseaseViewModel> GetDisease(int id) { var diseaseDTO = _service.Get(id); if (diseaseDTO is null) { return(NotFound()); } return(DiseaseMapper.DTOtoDiseaseVM(diseaseDTO)); }
public ActionResult <IEnumerable <DiseaseViewModel> > GetDiseases() { return(_service.GetAll().Select(d => DiseaseMapper.DTOtoDiseaseVM(d)).ToArray()); }
public ActionResult <IEnumerable <DiseaseViewModel> > GetToothDiseases(int toothId) { return(_toothService.GetDiseases(toothId).Select(d => DiseaseMapper.DTOtoDiseaseVM(d)).ToArray()); }