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