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"); }
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"); }