private IActionResult GetMedicineDescriptionFromIsaGrpc(string medicine) { string response = new ClientScheduledService().SendMessage(medicine).Result; MedicineDescriptionService.Create(new MedicineDescriptionDto(medicine, response, 1)); return(Ok(response)); }
public Boolean SendOrderGrpc(UrgentMedicineOrder order) { try { string response = new ClientScheduledService().SendMessage(CreateOrder(order)).Result; return(true); } catch (Exception e) { return(false); } }
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)); }
public GrpcController() { service = new ClientScheduledService(); }
public UrgentProcurementController([FromServices] IMedicationsService medicationsService) { this._medicationsService = medicationsService; service = new ClientScheduledService(); }