Exemplo n.º 1
0
        public ActionResult AddUserComment(AddUserCommentViewModel vm)
        {
            var ops= new BlogPostOperations();
            var userComment = new UserComment();
            userComment.UserCommentContent = vm.UserCommentContent;
            userComment.UserCommentDate = DateTime.Parse(vm.UserCommentDate);
            userComment.UserCommentUserName = vm.UserCommentUserName;

            ops.AddNewUserComment(userComment, vm.PostID);

            return RedirectToAction("ListSinglePost", new {id= vm.PostID});
        }