Пример #1
0
 public QueryTranslator(IQueryable source, Expression expression, IEnumerable<ExpressionVisitor> visitors)
 {
     if (expression == null)
     {
         throw new ArgumentNullException("expression");
     }
     Expression = expression;
     _provider = new QueryTranslatorProvider<T>(source, visitors);
 }
Пример #2
0
        public QueryTranslator(IQueryable source, IEnumerable<ExpressionVisitor> visitors)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }

            if (visitors == null)
            {
                throw new ArgumentNullException("visitors");
            }

            Expression = Expression.Constant(this);
            _provider = new QueryTranslatorProvider<T>(source, visitors);
        }