public IActionResult Post([FromBody] EnderecoModel endereco, string documento)
        {
            ClienteEnderecoBO clienteEnderecoBO;
            ObjectResult      response;

            try
            {
                _log.LogInformation($"Starting Post('{JsonConvert.SerializeObject(endereco, Formatting.None)}')");

                clienteEnderecoBO = new ClienteEnderecoBO(_loggerFactory, _config);

                endereco = clienteEnderecoBO.Insert(endereco, documento);

                response = Ok(endereco);

                _log.LogInformation($"Finishing Post");
            }
            catch (Exception ex)
            {
                _log.LogError(ex.Message);
                response = StatusCode(500, ex.Message);
            }

            return(response);
        }
        public IActionResult Put(int id, EnderecoModel endereco)
        {
            ClienteEnderecoBO clienteEnderecoBO;
            ObjectResult      response;

            try
            {
                _log.LogInformation($"Starting Put( {id}, '{JsonConvert.SerializeObject(endereco, Formatting.None)}')");

                clienteEnderecoBO = new ClienteEnderecoBO(_loggerFactory, _config);

                endereco.ID_end = id;
                endereco        = clienteEnderecoBO.Update(endereco);

                response = Ok(endereco);

                _log.LogInformation($"Finishing Put( {id} )");
            }
            catch (Exception ex)
            {
                _log.LogError(ex.Message);
                response = StatusCode(500, ex.Message);
            }

            return(response);
        }
        public IActionResult Get(int id)
        {
            ClienteEnderecoBO    clienteEnderecoBO;
            List <EnderecoModel> enderecos;
            ObjectResult         response;

            try
            {
                _log.LogInformation("Starting Get()");

                clienteEnderecoBO = new ClienteEnderecoBO(_loggerFactory, _config);
                enderecos         = clienteEnderecoBO.Get(id);

                response = Ok(enderecos);

                _log.LogInformation($"Finishing Get() with '{enderecos.Count}' results");
            }
            catch (Exception ex)
            {
                _log.LogError(ex.Message);
                response = StatusCode(500, ex.Message);
            }

            return(response);
        }