public void OnGet(int?bookId)
 {
     if (bookId.HasValue)
     {
         Book = bookAction.GetById(bookId.Value);
     }
 }
Ejemplo n.º 2
0
 public IActionResult OnGet(int bookId)
 {
     Book = bookAction.GetById(bookId);
     if (Book == null)
     {
         return(RedirectToPage("./NotFound"));
     }
     return(Page());
 }