Ejemplo n.º 1
0
        public ActionResult RemoveBook(int bookId)
        {
            BookDbContext bookDbContext = new BookDbContext();
            Book          book          = bookDbContext.Books.Find(bookId);
            MyCart        cart          = MyCart.GetCart();
            int           result;

            if (book != null)
            {
                result = cart.RemoveBook(book);
            }
            return(RedirectToAction("Index"));
        }