public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var client = new EmployeeService.EmployeeServiceClient(channel); Employee employee = client.Get(new EmployeeId() { Id = (int)id }); if (employee == null) { return(NotFound()); } return(View(employee)); }