dbelmont/ExpressionBuilder

TrimToLower

Opened this issue · 0 comments

Adding Trim() and ToLower() to the member and constant expression is causing lambda expression to return null. I believe LINQ doesn't know how to translate string.Trim() and string.ToLower(). This causes my code to throw an exception: "Value right cannot be null. Parameter right"

So I removed any calls to TrimToLower() in the GetExpression method under Operation classes (EqualTo.cs, Contains.cs, etc) and that solved the issue.

Should Trim() and ToLower() really be part of the lambda expression?