public IActionResult OnGet(int islandId) { Island = islandDataService.GetById(islandId); if (Island == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public IActionResult OnGet(int?islandId) { this.Climates = htmlHelper.GetEnumSelectList <ClimateType>(); if (islandId.HasValue) { Island = islandData.GetById(islandId.Value); } else { Island = new Island(); } return(Page()); }