private CollectionResourceQueryModel GenerateQueryModel(Expression expression) { // Transform var transformedExpression = ApplyTransformations(expression); // Discover var discoveringVisitor = new DiscoveringExpressionVisitor(); discoveringVisitor.Visit(transformedExpression); // Compile var compilingVisitor = new CompilingExpressionVisitor(); compilingVisitor.Visit(discoveringVisitor.Expressions); var compiledModel = compilingVisitor.Model; // Validate var validator = new QueryModelValidator(compiledModel); validator.Validate(); return compiledModel; }
private CollectionResourceQueryModel GenerateQueryModel(Expression expression) { // Transform var transformedExpression = ApplyTransformations(expression); // Discover var discoveringVisitor = new DiscoveringExpressionVisitor(); discoveringVisitor.Visit(transformedExpression); // Compile var compilingVisitor = new CompilingExpressionVisitor(); compilingVisitor.Visit(discoveringVisitor.Expressions); var compiledModel = compilingVisitor.Model; // Validate var validator = new QueryModelValidator(compiledModel); validator.Validate(); return(compiledModel); }