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()); }
public IActionResult OnGetAsync(int?id) { if (id == null) { return(NotFound()); } Patient = _patientsList.GetById(id); if (Patient == null) { return(NotFound()); } return(Page()); }