Exemplo n.º 1
0
        public IActionResult OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var patient = _patientsList.GetById(id);

            if (patient == null)
            {
                return(NotFound());
            }

            PatientView = new PatientView {
                Id        = patient.Id,
                Name      = patient.Name,
                Species   = patient.Species.Name,
                Age       = patient.Age,
                PhotoPath = patient.PhotoPath,
                NotesPath = patient.NotesPath
            };

            return(Page());
        }
Exemplo n.º 2
0
        public IActionResult OnGetAsync(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            Patient = _patientsList.GetById(id);

            if (Patient == null)
            {
                return(NotFound());
            }
            return(Page());
        }