Ejemplo n.º 1
0
 public IActionResult OnGet(int locationId)
 {
     Location = locationData.GetById(locationId);
     if (Location == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Ejemplo n.º 2
0
        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());
        }