private static DiscussionComment MapParent(Reply reply) { var result = new DiscussionComment(); result.Id = reply.Id; result.Text = reply.Text; result.User = Mappers.MapUserToUserViewModel(reply.User); return result; }
private static DiscussionComment MapPost(Post post) { var result = new DiscussionComment(); result.Id = post.Id; result.Text = post.Text; result.User = Mappers.MapUserToUserViewModel(post.User); if (post.Parent != null) result.RootComment = Mappers.MapParent(post.Parent); return result; }