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>); }
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); }