Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }