Example #1
0
 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));
 }
Example #2
0
 public SimpleQueryable(SimpleQueryProvider provider)
 {
     _provider   = provider ?? throw new ArgumentNullException(nameof(provider));
     _expression = Expression.Constant(this);
 }