Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> GetPacient(int id)
        {
            var pacient = await _pacientRepository.GetPacient(id);

            return(Ok(pacient));
        }