public async Task <ActionResult> Get() { var result = await _pacienteService.GetAllAsync(); if (_notify.HaveNotification()) { return(Json(new { success = false, mensagem = string.Join(".", _notify.GetNotifications().Select(n => n.ErrorMessage).FirstOrDefault()) })); } return(View("_Lista", _mapper.Map <IEnumerable <PacienteViewModelGet> >(result))); }
public IActionResult Get() { var paciente = _pacienteService.GetAllAsync(); return(Json(paciente)); }