public IActionResult OnGet(int mangaId) { MangaB = mangaData.GetById(mangaId); if (MangaB == null) { return(RedirectToPage("./NotFound")); } return(Page()); }
public IActionResult OnGet(int?mangaId) { Genres = htmlHelper.GetEnumSelectList <Genre>(); if (mangaId.HasValue) { Manga = mangabookData.GetById(mangaId.Value); } else { Manga = new MangaB(); } if (Manga == null) { return(RedirectToPage("./NotFound")); } return(Page()); }