public ActionResult AddToCart(string id)
        {
            DAL.RestaurantMenu    restaurantMenu = menuModel.find(int.Parse(DataSecurityTripleDES.GetPlainText(id)));
            RestaurantMenuCartDTO thisMenuDTO    = EntityDTOHelper.GetEntityDTO <RestaurantMenu, RestaurantMenuCartDTO>(restaurantMenu);

            DAL.Restaurant restaurant = db.Restaurant.Find(restaurantMenu.OwnerId);

            thisMenuDTO.ServiceOwnerName = restaurant.Name;
            thisMenuDTO.ServiceOwnerId   = DataSecurityTripleDES.GetEncryptedText(restaurant.Id);
            thisMenuDTO.ServiceOwnerType = DataSecurityTripleDES.GetEncryptedText((int)OwnerTypeEnum.ServiceProvider);

            DAL.Address address = db.Address.Find(restaurant.AddressId);
            if (address != null)
            {
                AddressDTO addressDTO = EntityDTOHelper.GetEntityDTO <DAL.Address, AddressDTO>(address);
                thisMenuDTO.ServiceOwnerAddressDetail = addressDTO.GetAddressString(true);
            }

            if (thisMenuDTO != null)
            {
                thisMenuDTO.Quantity = 1;

                CraveatsCart craveatsCart = (Session["cart"] == null) ? new CraveatsCart(SessionManager.GetContextSessionLoggedUserID()) : (Session["cart"] as CraveatsCart);
                craveatsCart.AddToCart(thisMenuDTO);

                Session["cart"] = craveatsCart;
            }

            return(RedirectToAction("Index"));
        }
        public ActionResult Remove(string id)
        {
            RestaurantMenuCartDTO thisMenuDTO = EntityDTOHelper.GetEntityDTO <RestaurantMenu, RestaurantMenuCartDTO>(menuModel.find(int.Parse(DataSecurityTripleDES.GetPlainText(id))));

            if (thisMenuDTO != null && Session["cart"] != null)
            {
                CraveatsCart craveatsCart = Session["cart"] as CraveatsCart;
                craveatsCart.RemoveItem(id);

                Session["cart"] = craveatsCart;
            }

            return(RedirectToAction("Index"));
        }