Beispiel #1
0
        public DataQueryable(DataQueryProvider provider, Expression expression)
        {
            if (!typeof(IQueryable <TModel>).IsAssignableFrom(expression.Type))
            {
                throw new ArgumentOutOfRangeException("expression");
            }

            this.Provider   = provider ?? throw new ArgumentException("provider");
            this.Expression = expression ?? throw new ArgumentException("expression");
        }
Beispiel #2
0
        public DataQueryable(DataStore store)
        {
            var provider   = new DataQueryProvider(store);
            var expression = Expression.Constant(this);

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

            this.Provider   = provider ?? throw new ArgumentException("provider");
            this.Expression = expression ?? throw new ArgumentException("expression");
        }