예제 #1
0
        public static PostCommentModel CommentToPostCommentModel(Comment comment)
        {
            var postCommentModel = new PostCommentModel()
                {
                    Text = comment.Text,
                    PostDate = comment.PostDate,
                    CommentedBy = comment.CommentedBy == null ? null : comment.CommentedBy.DisplayName,
                };

            return postCommentModel;
        }
예제 #2
0
        public static PostCommentModel CommentToPostCommentModel(Comment comment)
        {
            var postCommentModel = new PostCommentModel()
            {
                Text        = comment.Text,
                PostDate    = comment.PostDate,
                CommentedBy = comment.CommentedBy == null ? null : comment.CommentedBy.DisplayName,
            };

            return(postCommentModel);
        }