public RedirectToRouteResult AddToCart(Cart cart, int id, string returnUrl) { var menuItem = _baseDataAccess.GetMenuItems() .FirstOrDefault(m => m.Id == id); if (menuItem == null) throw new ArgumentException("There is no item with this id"); cart.AddItem(menuItem, 1); return RedirectToAction("Index", new { returnUrl }); }