Replies: 1 comment 1 reply
-
PR's welcome. I would look around here and consider a conversion as an alternative to mapping for this use case. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am having an issue with the library. I am using it to translate expressions regarding filtering in a database query. Below I have code to illustrate a simple example that causes the issue.
Calling TranslateCar causes an exception:
System.InvalidOperationException: 'The binary operator NotEqual is not defined for the types 'System.Int32' and 'Test+Color'.'
This seems to me that the constant part of the expression is not being translated, but the other side of the expression is. I tried a few different ways of mapping the attribute with a custom resolver, but nothing seems to affect the constant part of the expression.
One way to fix it is to not have it map from an enum to an int, but I would certainly like to have that as an option for when appropriate.
Is this the intended effect? If it is, how do I go about fixing this issue? Thanks for any help.
Beta Was this translation helpful? Give feedback.
All reactions