public ActionResult EditBook(Book book) { DAL_Library dal_Library = new DAL_Library(); dal_Library.EditBook(book); return(RedirectToAction("BookList")); }
public ActionResult RemoveFromFavorites(int id) { Book book = new Book(); BookListVM books = new BookListVM(); DAL_Library dal_Library = new DAL_Library(); books.books = dal_Library.GetBookList(); book = books.books.Where(b => b.bookId == id).Single(); book.like = false; dal_Library.EditBook(book); return(RedirectToAction("MyFavorite", "Home")); }