Exemplo n.º 1
0
        public IActionResult GetMedicineDescription(string medicine)
        {
            String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine);

            if (medicineDescription.Equals(""))
            {
                return(GetMedicineDescriptionFromIsa(medicine));
            }
            return(Ok(medicineDescription));
        }
Exemplo n.º 2
0
        public IActionResult GetMedicineDescription(string medicine)
        {
            String medicineDescription = MedicineDescriptionService.GetMedicineDescriptionFromDatabase(medicine);

            if (medicineDescription.IsNullOrEmpty())
            {
                return(GetMedicineDescriptionFromIsaHttp(medicine));
            }
            return(Ok(medicineDescription));
        }
Exemplo n.º 3
0
        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));
        }