public async Task <bool> CompleteFreight(int truckerId, int freightId, int status) { var channel = GrpcChannel.ForAddress("https://localhost:5003"); try { var client = new Greeter.GreeterClient(channel); var request = new CompleteFreightRequest(); request.TruckerId = truckerId; request.FreightId = freightId; request.Status = status; var response = await client.CompleteFreightAsync(request); return(response.Success); } finally { await channel.ShutdownAsync(); } }