Пример #1
0
        public ActionResult AddToCart(Guid t_guid)
        {
            Guid guid      = Guid.NewGuid();
            var  user_id   = User.Identity.GetUserId();
            var  getTravel = _tr.SelectTravel(t_guid);
            bool check     = _tr.CheckFavorite(t_guid, user_id);

            if (check == false)
            {
                _tr.AddCart(guid, user_id, t_guid);
                return(RedirectToAction("Index", new { Guid = t_guid }));
            }
            return(RedirectToAction("Index", new { Guid = t_guid }));
        }