Example #1
0
        public ActionResult AddComment(AddCommentViewModel model)
        {
            int userId = _accountService.GetUserByLogin(User.Identity.Name).UserId;

            _postService.AddComment(model.ToBllComment(userId, User.Identity.Name));
            return(RedirectToAction("LoadMoreComment", new { page = 0, id = model.PostId }));
        }