Esempio n. 1
0
 public IActionResult OnGet(int mangaId)
 {
     MangaB = mangaData.GetById(mangaId);
     if (MangaB == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }
Esempio n. 2
0
 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());
 }