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

            return(Page());
        }