nhibernate/nhibernate-core — pull request #52 by hazzik (2012-01-11 14:31:15+00:00)
Title: More on NH-2998: AsQueryable() on child collection should be able to operate complex lambda expressions

Now PartialEvaluatingExpressionTreeVisitor does not evaluating closures in externally built lambdas, so following query will not execute.

```csharp
var ids = new[] {1}; // closure

Expression> predicate = e => !ids.Contains(e.Id); // wraps with ConstantExpression

var query = (from timesheet in db.Timesheets
where timesheet.Entries.AsQueryable().Any(predicate)
select timesheet).ToList();
```

Added new visitor which is able to partially evaluate lambda expressions inside `ConstantExpression`