コード例 #1
0
 public SubCommentModel(SubComment subcom)
 {
     this.ParentCommentId = subcom.ParentComment;
     this.Id = subcom.Id;
     this.Content = subcom.Content;
     this.Date = subcom.Date;
     this.Author = subcom.User.Username;
 }
コード例 #2
0
        private SubComment CreateSubComment(SubCommentModel comment)
        {
            var user = UserPersister.GetUser(comment.Author);
            var newComment = new SubComment();
            newComment.AuthorId = user.Id;
            newComment.Content = comment.Content;
            newComment.Date = comment.Date;
            newComment.ParentComment = comment.ParentCommentId;

            return newComment;
        }