public IActionResult EditBook(Book bookToEdit) { // Assert model state if (ModelState.IsValid) { // Edit and update a book in the database _bookRepository.EditBook(bookToEdit); // Redirect to action return(RedirectToAction("BooksList")); } else { return(View(bookToEdit)); } }
public void EditBook(Books book) { ibook.EditBook(book); }