常用方法
常用方法
常用方法
常用方法
public async Task <IActionResult> GetOrderInfo() { using var channel = GrpcChannel.ForAddress("https://localhost:5002"); var client = new UserService.UserServiceClient(channel); var user = await client.GetUserInfoAsync(new GetUserInfoRequest { Id = 10 }); return(Ok(user)); }