// GET: Paciente/Details/5
        public ActionResult Details(int id)
        {
            var paciente          = _pacienteApp.GetById(id);
            var pacienteViewModel = Mapper.Map <Paciente, PacienteViewModel>(paciente);

            return(View(pacienteViewModel));
        }
        // GET: api/Paciente/5
        public PacienteViewModel Get(int id)
        {
            var paciente          = _pacienteApp.GetById(id);
            var pacienteViewModel = PacienteViewModel.Map(paciente);

            return(pacienteViewModel);
        }
 public JsonResult GetById(int id)
 {
     try
     {
         var paciente = _pacienteAppService.GetById(id);
         return(new JsonResult(new { paciente })
         {
             StatusCode = 200
         });
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, "Error obteniendo Paciente");
         return(new JsonResult(new { message = ex.Message })
         {
             StatusCode = 500
         });
     }
 }
Exemple #4
0
 // GET: Pacientes/Details/5
 public ActionResult Details(int id)
 {
     return(View(pacienteAppService.GetById(id)));
 }