public async Task <ActionResult <IList <Address> > > AdicionarEndereco([FromRoute] int codigoCliente, [FromBody] AddressInput input) { try{ input.Validate(); if (input.Invalid) { return(UnprocessableEntity()); } var result = await clienteService.AddAddress(input, codigoCliente); return(Ok(result)); }catch { return(BadRequest()); } }