public IQueryable <TElement> CreateQuery <TElement>(Expression expression) { var comando = _comando.CriarComando(); var sql = new QueryBuilder <TElement>(expression).ToString(); comando.CommandText = sql; var reader = _comando.ConsultarRegistro(comando); var itens = new List <TElement>(); try { var conversor = Conversor.ConverterDataReaderParaObjeto <TElement>(reader); foreach (var registro in conversor) { itens.Add(registro); } } finally { reader.Close(); } return(itens.AsQueryable()); }