Skip to content

Instantly share code, notes, and snippets.

@ahmagdy
Created February 17, 2019 16:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmagdy/6a4c229a65210c821e61027faa3d7c34 to your computer and use it in GitHub Desktop.
Save ahmagdy/6a4c229a65210c821e61027faa3d7c34 to your computer and use it in GitHub Desktop.
using System;
using Accountproto;
using Grpc.Core;
namespace AccountServiceClient
{
class Program
{
static void Main(string[] args)
{
var channel = new Channel("localhost:3000", ChannelCredentials.Insecure);
var client = new AccountService.AccountServiceClient(channel);
var reply = client.CreateAccount(new CreateAccountRequest() {Username = "Adam",Email = "a@amagdy.me"});
Console.WriteLine($"Reply from the server with message {reply.Id}");
channel.ShutdownAsync().Wait();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment