Update partial evaluator to inline IQueryable ConstantExpressions in re-linq front end

Description

When the evaluator detects a ConstantExpression with an IQueryable value, the ConstantExpression should be replaced by the IQueryable's expression.

Consider the following example:

1 2 var x = from p in Persons where p.Surname == "Freud" select p; var y = from p in Persons where x.Contains (p) select p;

With this new feature, the second query will appear to the LINQ provider as follows:

1 var y = from p in Persons where (from p in Persons where p.Surname == "Freud" select p).Contains (p) select p;

This has been integrated into the PartialEvaluatingExpressionTreeVisitor because the inlined expression (usually) also needs to be partially evaluated anyway.

Status

Assignee

Fabian Schmied

Reporter

Labels

Time tracking

2h

Components

Fix versions

Priority

Normal