public IActionResult GetMedicineDescription(string medicine) { String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine); if (medicineDescription.Equals("")) { return(GetMedicineDescriptionFromIsa(medicine)); } return(Ok(medicineDescription)); }
public IActionResult GetMedicineDescription(string medicine) { String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine); if (medicineDescription.IsNullOrEmpty()) { return(GetMedicineDescriptionFromIsaHttp(medicine)); } return(Ok(medicineDescription)); }
public IActionResult GetMedicineDescriptionGrpc(string medicine) { String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine); if (medicineDescription.Equals("")) { return(GetMedicineDescriptionFromIsa(medicine)); } string response = new ClientScheduledService().SendMessage(medicine).Result; MedicineDescriptionService.Create(new MedicineDescriptionDto(medicine, response, 1)); return(Ok(response)); }