public ActionResult <Logradouro> GetLogradouroById([FromHeader] string ibge, int id) { try { ibge = _config.GetConnectionString(Connection.GetConnection(ibge)); Logradouro logradouro = _Repository.GetLogradouroById(ibge, id); return(Ok(logradouro)); } catch (Exception ex) { var response = TrataErro.GetResponse(ex.Message, true); return(StatusCode((int)HttpStatusCode.InternalServerError, response)); } }