public async Task <ViewResult> Details(int id) { var pacient = _pacientRepository.GetPacient(id); var jsonPacient = JsonConvert.SerializeObject(pacient); await _broker.SendMessage(jsonPacient, "WebToWorker"); string coeficient = await _broker.ReceiveMessage("WorkerToWeb"); HomeDetailsViewModel homeDetailsViewModel = new HomeDetailsViewModel() { Pacient = _pacientRepository.GetPacient(id), Coeficient = coeficient }; return(View(homeDetailsViewModel)); }
public async Task <IActionResult> GetPacient(int id) { var pacient = await _pacientRepository.GetPacient(id); return(Ok(pacient)); }