Esempio n. 1
0
        public ResponseResult <List <String> > Get([FromBody] SymptomReq symptomReq)
        {
            ResponseResult <List <String> > result = new ResponseResult <List <String> >();

            try
            {
                SymtomsService symtomsService = new SymtomsService();
                result.Result = symtomsService.GetDiseaseBySymptomIds(symptomReq.Ids); // [{id: 1},{id:2}]
            }
            catch (Exception e)
            {
                result.IsSuccess = false;
                result.Message   = e.Message;
            }
            return(result);
        }
Esempio n. 2
0
        public ResponseResult <List <Symptoms> > Get()
        {
            ResponseResult <List <Symptoms> > result = new ResponseResult <List <Symptoms> >();

            try
            {
                SymtomsService symtomsService = new SymtomsService();
                result.Result = symtomsService.GetSymptoms();
            }
            catch (Exception e)
            {
                result.IsSuccess = false;
                result.Message   = e.Message;
            }
            return(result);
        }