Пример #1
0
        public ActionResult FollowProduct(Follow vm)
        {
            if (followService.isExistFollow(vm.ProductId, vm.UserId) == false)
            {
                vm.IsChecked = true;
                followService.AddFollow(vm);
            }
            else
            {
                var model = followService.FindFollow(vm.ProductId, vm.UserId);
                followService.DeleteFollow(model);
            }

            return(RedirectToAction("Index", "Home"));
        }