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);
}