Exemple #1
0
 internal NCacheQuery(QueryProviderBase 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");
     }
     this._queryProvider = provider;
     this.expression     = expression;
 }
Exemple #2
0
 public NCacheQuery(Cache cache)
 {
     _queryProvider  = new NCache.Linq.NCacheQueryProvider(cache);
     this.expression = Expression.Constant(this);
 }