public static int CreateComment(int articleId, string author, string content, string sessionKey) { string commentUrl = "comments/Add?sessionKey=" + sessionKey; CommentModel comment = new CommentModel { ArticleId = articleId, Author = author, Content = content, Date = DateTime.Now }; var response = requester.Post<int>(commentUrl, comment); return response; }
public void NavigateToCreateSubcomment(object sender, CommentModel comment) { this.CurrentViewModel = this.CreateSubcommentViewModel; this.CreateSubcommentViewModel.SetComment(comment); }
public void SetComment(CommentModel comment) { this.Comment = comment; this.ParentCommentId = comment.Id; }