public IActionResult Create(Customer customer)
 {
     if (ModelState.IsValid)
     {
         var client = new
                      CustomerService.CustomerServiceClient(channel);
         var createdCustomer = client.Insert(customer);
         return(RedirectToAction(nameof(Index)));
     }
     return(View(customer));
 }
        public void Insert(CustomerDTO customerDTO)
        {
            var proto = _mapperCustomer.DTOToProto(customerDTO);

            var customer = new CustomerPost
            {
                IdAddress = proto.IdAddress,
                Name      = proto.Name,
                Surname   = proto.Surname,
                Cpf       = proto.Cpf,
                Genre     = proto.Genre.ToString()
            };

            _serviceGrpcCustomer.Insert(customer);
        }