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)); }
public System.Threading.Tasks.Task <PostComment.Comment> UpdateCommentAsync(PostComment.Comment newComment) { return(base.Channel.UpdateCommentAsync(newComment)); }
public PostComment.Comment UpdateComment(PostComment.Comment newComment) { return(base.Channel.UpdateComment(newComment)); }
public System.Threading.Tasks.Task <bool> AddCommentAsync(PostComment.Comment comment) { return(base.Channel.AddCommentAsync(comment)); }
public bool AddComment(PostComment.Comment comment) { return(base.Channel.AddComment(comment)); }
public Task <Comment> UpdateCommentAsync(PostComment.Comment newComment) { throw new NotImplementedException(); }