public async Task <ActionResult> Add(string reviewId, string revisionId, string elementId, string commentText) { var comment = new CommentModel(); comment.TimeStamp = DateTime.UtcNow; comment.ReviewId = reviewId; comment.RevisionId = revisionId; comment.ElementId = elementId; comment.Comment = commentText; await _commentsManager.AddCommentAsync(User, comment); return(await CommentPartialAsync(reviewId, comment.ElementId)); }
public async Task <ActionResult> Add(string reviewId, string revisionId, string elementId, string commentText) { var comment = new CommentModel(); comment.TimeStamp = DateTime.UtcNow; comment.ReviewId = reviewId; comment.RevisionId = revisionId; comment.ElementId = elementId; comment.Comment = commentText; await _commentsManager.AddCommentAsync(User, comment); var review = await _reviewManager.GetReviewAsync(User, reviewId); if (review != null) { await _notificationManager.SubscribeAsync(review, User); } return(await CommentPartialAsync(reviewId, comment.ElementId)); }