Esempio n. 1
0
        public static DataServiceQuery <TElement> Translate <TElement>(DataServiceQuery <TElement> source, CriteriaOperator filter)
        {
            var        visitor    = new DataServiceQueryTranslator(filter);
            Expression expression = visitor.Visit(source.Expression);

            return(source.Provider.CreateQuery(expression) as DataServiceQuery <TElement>);
        }
Esempio n. 2
0
        public static DataServiceQuery Translate(DataServiceQuery source, CriteriaOperator filter)
        {
            var        visitor             = new DataServiceQueryTranslator(filter);
            Expression reducibleExpression = GetReducibleExpression(source);
            Expression expression          = visitor.Visit(reducibleExpression);

            return(source.Provider.CreateQuery(expression) as DataServiceQuery);
        }