コード例 #1
0
        public IActionResult GetById(int id)
        {
            var client   = new Greeter.GreeterClient(channel);
            var employee = client.Get(new EmployeeId {
                Id = id
            });

            if (employee == null)
            {
                return(NotFound());
            }
            return(new ObjectResult(employee));
        }