IQueryable IQueryProvider.CreateQuery(Expression expression) { var translator = new QueryStringTranslator(); QueryStringQuery = translator.Translate(expression); return(this); }
public void an_equality_check_is_created() { var qst = new QueryStringTranslator(); Expression<Func<Customer, bool>> query = c => c.FirstName == "Ian"; var TheResult = qst.Translate(query); TheResult.ShouldBe("FirstName eq 'Ian'"); }
IQueryable <TElement> IQueryProvider.CreateQuery <TElement>(Expression expression) { var translator = new QueryStringTranslator(); QueryStringQuery = translator.Translate(expression); if (typeof(TElement) == typeof(T)) { return((IQueryable <TElement>) this); } return(new ResourceContext <TElement>()); }