Esempio n. 1
0
 public async Task<IActionResult> GetDiseaseIdByName(string name)
 {
     try
     {
         return Json(
               new
               {
                   Success = true,
                   Data = JsonConvert.SerializeObject(await _diseaseRepository.GetDiseaseIdByName(name))
               });
     }
     catch (Exception exception)
     {
         return Json(new { Success = false, exception.Message });
     }
 }