BlogSharp.Web.Controllers.PostController.AddComment C# (CSharp) Method

AddComment() private method

private AddComment ( int postId, Feedback comment ) : System.Web.Mvc.ActionResult
postId int
comment Feedback
return System.Web.Mvc.ActionResult
        public ActionResult AddComment(int postId, Feedback comment)
        {
            var post = postService.GetPostById(CurrentBlog, postId);
            comment.Date = DateTime.Now;
            using (var tranScope = new TransactionScope())
            {
                try
                {
                    postService.AddComment(comment);
                    tranScope.Complete();
                }
                catch (ValidationException vex)
                {
                    Transaction.Current.Rollback();
                    ModelState.AddValidationExceptionToModel("comment", vex);
                }
            }
            return View("Read", post);
        }