public bool HaveMoreThanFourLevels(CommentSoap commentSoap)
 {
     try
     {
         return(CommentService.HaveMoreThanFourLevels(new CommentDto
         {
             Id = commentSoap.Id
         }));
     }
     catch (ApplicationException ex)
     {
         throw new FaultException(ex.Message);
     }
 }
 public int CreateComment(CommentSoap commentSoap, int postId)
 {
     try
     {
         return(CommentService.CreateComment(new CommentDto
         {
             CommentText = commentSoap.CommentText,
             UserName = commentSoap.UserName,
             ParentId = commentSoap.ParentId,
             PostId = commentSoap.PostId
         }, postId));
     }
     catch (ApplicationException ex)
     {
         throw new FaultException(ex.Message);
     }
 }
 public int DeleteComment(CommentSoap commentSoap)
 {
     try
     {
         return(CommentService.DeleteComment(new CommentDto
         {
             Id = commentSoap.Id,
             CommentText = commentSoap.CommentText,
             UserName = commentSoap.UserName,
             ParentId = commentSoap.ParentId,
             PostId = commentSoap.PostId
         }));
     }
     catch (ApplicationException ex)
     {
         throw new FaultException(ex.Message);
     }
 }
 public CommentViewModel GetComment(int commentId)
 {
     try
     {
         CommentSoap comment = CommentServiceClient.GetComment(commentId);
         return(new CommentViewModel
         {
             Id = comment.Id,
             CommentText = comment.CommentText,
             UserName = comment.UserName,
             ParentId = comment.ParentId,
             PostId = comment.PostId,
             CreationDate = comment.CreationDate.ToString()
         });
     }
     catch (FaultException ex)
     {
         throw new ApplicationException(ex.Message);
     }
 }