Exemplo n.º 1
0
        public IEnumerable <T> ExecuteCollection <T>(QueryModel queryModel)
        {
            BuiltQuery builtQuery;

            if (EntityHelpers.IsConstant(typeof(T)))
            {
                builtQuery = BuiltQuery.Constant(typeof(T));
            }
            else
            {
                var builder = new QueryBuilder(typeRegistry);
                queryModel.Accept(new QueryModelVisitor(builder));
                builtQuery = builder.Build();
            }
            return(execute(builtQuery).Cast <T>());
        }