I am trying to write a static function to Or two expressions, but recieve the following error:
The parameter \'item\' is not in scope.
Descrip
The issue is that the Expression you're creating in the method OrExpressions reuses the body of the two expressions. Those bodies will contain references to their own ParameterExpression that has been defined in FilterExpression.
A fix would be to rewrite the left and right parts to use the new ParameterExpression. Or to pass the original ParameterExpression along. It's not because the two ParameterExpression have the same name that they represent the same parameter.