public IActionResult OnGet(int id) { Books = _ibookDetails.GetBookById(id); if (Books == null) { return(RedirectToAction("Details", "Books")); } return(Page()); }
public IActionResult Info(int id) { var model = _bookDetails.GetBookById(id); if (model == null) { return(RedirectToAction(nameof(Details))); } return(View(model)); }