Esempio n. 1
0
        public ActionResult EditBook(Book book)
        {
            DAL_Library dal_Library = new DAL_Library();

            dal_Library.EditBook(book);
            return(RedirectToAction("BookList"));
        }
Esempio n. 2
0
        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"));
        }