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