Beispiel #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));
        }
Beispiel #2
0
 public System.Threading.Tasks.Task <PostComment.Post> UpdatePostAsync(PostComment.Post post)
 {
     return(base.Channel.UpdatePostAsync(post));
 }
Beispiel #3
0
 public System.Threading.Tasks.Task <bool> AddPostAsync(PostComment.Post post)
 {
     return(base.Channel.AddPostAsync(post));
 }
Beispiel #4
0
 public PostComment.Post UpdatePost(PostComment.Post post)
 {
     return(base.Channel.UpdatePost(post));
 }
Beispiel #5
0
 public bool AddPost(PostComment.Post post)
 {
     return(base.Channel.AddPost(post));
 }