public IActionResult OnGet(int locationId)
 {
     Location = locationData.GetById(locationId);
     if (Location == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
        public IActionResult OnGet(int?locationId)
        {
            if (locationId.HasValue)
            {
                Location = locationData.GetById(locationId.Value);
            }
            else
            {
                Location = new Location();
            }

            if (Location == null)
            {
                return(RedirectToPage("./NotFound"));
            }
            return(Page());
        }