Exemplo n.º 1
0
 public IActionResult OnGet(int doctorId)
 {
     Doctor = doctorData.GetById(doctorId);
     if (Doctor == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Exemplo n.º 2
0
        public IActionResult OnGet(int?doctorId)
        {
            Types = htmlHelper.GetEnumSelectList <DoctorType>();
            if (doctorId.HasValue)
            {
                Doctor = doctorData.GetById(doctorId.Value);
                if (Doctor == null)
                {
                    return(RedirectToPage("./NotFound"));
                }
            }
            else
            {
                Doctor = new Doctor();
            }

            return(Page());
        }