コード例 #1
0
        public IActionResult OnGet(int?isn)
        {
            if (isn.HasValue)
            {
                this.Book = BookData.GetByISN(isn.Value);
            }
            else
            {
                this.Book = new Book();
            }
            this.Categories = HtmlHelper.GetEnumSelectList <Category> ();

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