-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtering is not working on Nullable properties #5
Comments
Here is a fix for the nullable filter. Please review it
|
Can someone review this? |
This needs attention. |
Just a mention here, it seems that this issue only occurs for Int32s. as when I try the same code with String's it doesn't have that issue. Also looks like the issue happens on enum types as well |
I don't know why I was not receiving notifications for this repo... |
Steps to reproduce.
Actual Result
System.InvalidOperationException : The binary operator Equal is not defined for the types 'System.Nullable`1[System.Int32]' and 'System.Int32'.
Stack Trace:
Expression.GetEqualityComparisonOperator(ExpressionType binaryType, String opName, Expression left, Expression right, Boolean liftToNull)
Expression.Equal(Expression left, Expression right, Boolean liftToNull, MethodInfo method)
Expression.Equal(Expression left, Expression right)
DynamicExpressions.RobustEquals(MemberExpression prop, ConstantExpression constant) line 89
DynamicExpressions.CreateFilter(MemberExpression prop, FilterOperator op, ConstantExpression constant) line 62
DynamicExpressions.GetFilter(ParameterExpression param, String property, FilterOperator op, Object value) line 55
DynamicExpressions.GetPredicate[TEntity](String property, FilterOperator op, Object value) line 37
PredicateTests.GetPredicate_ShouldHandleNumericalOperators(Int32 id, String title, String property, FilterOperator op, Object value) line 22
The text was updated successfully, but these errors were encountered: