public SitecoreQueryable(SitecoreQueryProvider <T> provider, Expression expression)
        {
            if (provider == null)
            {
                throw new ArgumentNullException("provider");
            }

            if (expression == null)
            {
                throw new ArgumentNullException("expression");
            }

            if (!typeof(IQueryable <T>).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentOutOfRangeException("expression");
            }

            Provider   = provider;
            Expression = expression;
        }
 public SitecoreQueryable(Database database)
 {
     _database  = database;
     Provider   = new SitecoreQueryProvider <T>(database);
     Expression = Expression.Constant(this);
 }