public static bool AddNewComment(Comment newComment)
        {
            // Verify that the service doesn't already exist
            Comment oldComment = CommentPersistence.GetComment(newComment.CommentId);

            // oldService should be null, if this is a new service
            if (oldComment != null)
            {
                return(false);
            }

            return(CommentPersistence.AddComment(newComment));
        }
Пример #2
0
 /// <summary>
 /// Adds the comment into the database.
 /// </summary>
 /// <param name="newComment">Comment that wanted to be added.</param>
 /// <returns>Boolean value whether the transaction is happened or not.</returns>
 public static bool AddNewComment(Comment newComment)
 {
     return(CommentPersistence.AddComment(newComment));
 }