-
-
Notifications
You must be signed in to change notification settings - Fork 736
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 record struct support for sort #7166
base: main
Are you sure you want to change the base?
Conversation
@zyofeng I dont think this works as this would also treat structs like |
You are correct, I've updated the PR to filter out structs such as guid, decimal by checking for PrintMembers method, which is a generated method specifically for record structs |
8a97a79
to
e2d2300
Compare
@zyofeng How does one of you sort queries look like? |
I have the following record struct
using the updated sortconvention I am able to sort using this query
and generate the following EF Core query
since IsNonCompliantCountry is a boolean struct this means the modified SortConvention works for normal struct. |
Is this looking okay? |
This one needs tests for this otherwise we cannot verify if this is a good idea or not. We need tests showing that Guid and other important structs are ignored. What is with typed id structs ... they are not primitives. |
@zyofeng Are you still working on this? |
Im happy to take a look at implementing some tests for record struct vs common struct types like guid, datetime etc when I get some time, hopefully this weekend. |
…t types like datetime, dateonly, guids etc
I've added some tests for common struct types as well as custom sort type convention, let me know if this is sufficient. |
Summary of the changes (Less than 80 chars)
Add support for record struct sortconvention