public RedirectToRouteResult RemoveFromCart(CartServices cart, int bookId, string returnUrl) { BookView book = repository.GetList() .FirstOrDefault(g => g.Id == bookId); if (book != null) { cart.RemoveLine(book); } return(RedirectToAction("Index", new { returnUrl })); }