Expression.Or, The parameter 'item' is not in scope

前端 未结 5 1147
一整个雨季
一整个雨季 2021-02-09 00:23

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

5条回答
  •  独厮守ぢ
    2021-02-09 00:36

    Fabrizio's solution also occurred to me as well but since I was attempting to combine two expressions that would be executed as a linq 2 sql query, I thought it would execute in memory rather than the sql server.

    I was wrote - Linq-To-Sql recognises that the invocation is of a lambda expression and thus still produces optimized sql.

提交回复
热议问题