private static void UpdateBlog(BlogService.BlogServiceClient client, Blog.Blog blog) { try { blog.Title = "Updated Title"; var response = client.UpdateBlog(new UpdateBlogRequest() { Blog = blog }); Console.WriteLine(response.Blog.ToString()); } catch (RpcException ex) { Console.WriteLine(ex.Status.Detail); } }
private static void UpdateBlog(BlogService.BlogServiceClient client, Blog.Blog blog) { try { blog.AuthorId = "Maria camila"; blog.Title = "Blog de cami"; blog.Content = "barbies y muñecos"; var response = client.UpdateBlog(new UpdateBlogRequest() { Blog = blog }); Console.WriteLine(response.Blog.ToString()); } catch (RpcException e) { Console.WriteLine(e.Status.Detail); } }
public static string updateBlog(BlogService.BlogServiceClient client, Blog.Blog blog) { try { blog.Id = "5f9f0f21a772b24eadb150a8"; blog.AuthorId = "Ali"; blog.Content = "Agah"; blog.Title = "Welcome To Iran"; var response = client.UpdateBlog(new UpdateBlogRequest() { Blog = blog }); return(response.Blog.ToString()); } catch (System.IO.IOException e) { Console.WriteLine("client error:" + e.Message); throw; } }
private static void UpdateBlog(BlogService.BlogServiceClient client) { try { var blog = new Blog.Blog { AuthorId = "Şefik Can Totti", Content = "Test Content v2", Title = "Test Title v2", Id = "5e91e157d31ecb45c8f84714" }; var response = client.UpdateBlog(new UpdateBlogRequest() { Blog = blog }); Console.WriteLine(response.Blog.ToString()); } catch (RpcException e) { Console.WriteLine(e.Status.Detail); } }