mrahhal / MR.EntityFrameworkCore.KeysetPagination

Keyset/Seek/Cursor pagination for Entity Framework Core.
MIT License
218 stars 11 forks source link

Add Enum support in keyset #54

Closed vpachta closed 5 months ago

vpachta commented 5 months ago

Closes #29

vpachta commented 5 months ago

Implementation for issue #29
Tested with Postgress + Sqlite DB.

vpachta commented 5 months ago

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.

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.

mrahhal commented 5 months ago

Thanks!