public CustomerDTO Get(int?id) { var customer = _serviceGrpcCustomer.Get(new Request { Id = id.Value }); return(_mapperCustomer.ProtoToDTO(customer)); }
public IActionResult Edit(int?id) { if (id == null) { return(NotFound()); } var client = new CustomerService.CustomerServiceClient(channel); Customer customer = client.Get(new CustomerId() { Id = (int)id }); if (customer == null) { return(NotFound()); } return(View(customer)); }