Ejemplo n.º 1
0
        public override Task <Response> AddPost(Post post, ServerCallContext context)
        {
            Response output = new Response();

            PostComment.Comment c = new PostComment.Comment();
            PostComment.Post    p = new PostComment.Post();
            p.PostId      = post.PostId;
            p.Description = post.Description;
            p.Domain      = post.Domain;
            p.Date        = post.Date;

            List <PostComment.Comment> cList = new List <PostComment.Comment>();

            foreach (var i in post.Comments)
            {
                c.Text       = i.Text;
                c.PostPostId = i.PostPostId;
                c.CommentId  = i.CommentId;
                //c.Post = i.Post;

                cList.Add(c);
            }

            bool resp = API.AddPost(p);

            output.Resp = resp;

            return(Task.FromResult(output));
        }
Ejemplo n.º 2
0
 public System.Threading.Tasks.Task <PostComment.Comment> UpdateCommentAsync(PostComment.Comment newComment)
 {
     return(base.Channel.UpdateCommentAsync(newComment));
 }
Ejemplo n.º 3
0
 public PostComment.Comment UpdateComment(PostComment.Comment newComment)
 {
     return(base.Channel.UpdateComment(newComment));
 }
Ejemplo n.º 4
0
 public System.Threading.Tasks.Task <bool> AddCommentAsync(PostComment.Comment comment)
 {
     return(base.Channel.AddCommentAsync(comment));
 }
Ejemplo n.º 5
0
 public bool AddComment(PostComment.Comment comment)
 {
     return(base.Channel.AddComment(comment));
 }
Ejemplo n.º 6
0
 public Task <Comment> UpdateCommentAsync(PostComment.Comment newComment)
 {
     throw new NotImplementedException();
 }