Created
February 17, 2019 16:17
-
-
Save ahmagdy/6a4c229a65210c821e61027faa3d7c34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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