コード例 #1
0
        public IActionResult LikePost(int PostId)
        {
            User user = new User();

            user.Id = (int)HttpContext.Session.GetInt32("Id");
            Post post = new Post();

            post.PostId = PostId;
            _postLogic.LikePost(post, user);
            return(RedirectToAction("NewsFeed", "Home"));
        }
コード例 #2
0
        public IActionResult LikePost(int PostId, int RecieverId)
        {
            User user = new User();

            user.Id = (int)HttpContext.Session.GetInt32("Id");
            Post post = new Post();

            post.PostId = PostId;
            _postLogic.LikePost(post, user);
            return(RedirectToAction("SearchedProfile/" + RecieverId, "Profile"));
        }