public SimpleQueryable(Expression expression, SimpleQueryProvider provider) { _expression = expression ?? throw new ArgumentNullException(nameof(expression)); if (!typeof(IQueryable <T>).IsAssignableFrom(expression.Type)) { throw new ArgumentException(nameof(expression)); } _provider = provider ?? throw new ArgumentNullException(nameof(provider)); }
public SimpleQueryable(SimpleQueryProvider provider) { _provider = provider ?? throw new ArgumentNullException(nameof(provider)); _expression = Expression.Constant(this); }