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; }
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; }