-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add Enum support in keyset #54
Conversation
- add expression for converting enum to it's underlying type
Implementation for issue #29 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Overall this looks good, but I have requested mostly a few minor changes.
Other than that, there's one concern I have regarding the equality part of the expression generation. Usually, we either build a comparison (enum conversion being applied here) or an equality (not being applied). I would've assumed some tests would fail because we're not applying the same enum conversion logic on the equality part (which should be the case in the test case you added), but it seems to be passing. So not sure if this is working properly in some of these cases.
test/MR.EntityFrameworkCore.KeysetPagination.Tests/KeysetPaginationTest.cs
Outdated
Show resolved
Hide resolved
test/MR.EntityFrameworkCore.KeysetPagination.Tests/TestModels/MainModel.cs
Outdated
Show resolved
Hide resolved
src/MR.EntityFrameworkCore.KeysetPagination/KeysetFilterPredicateStrategy.cs
Outdated
Show resolved
Hide resolved
Actually equal expression works fine for Enums it does not require to convert it to underlying type. The problem was only for comparision and that is why I did not put it for equality part. |
Co-authored-by: Mohammad Rahhal <[email protected]>
Thanks! |
Closes #29