Skip to content
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

Case insensitive sort expression #26

Open
poganytamas opened this issue Oct 15, 2019 · 0 comments
Open

Case insensitive sort expression #26

poganytamas opened this issue Oct 15, 2019 · 0 comments

Comments

@poganytamas
Copy link

Your code is using property names as strings for sort expression. This leads to a problem using JavaScript frameworks. Usually when using JSON serializer in MVC core, properties gets camel cased, so eg. ServerId becomes serverId. When I set up for example a vuetify data table, I have to specify header properties: serverId, serverName... When I sort the table, and send back the code, it will search for serverId property, but there is none, there is only ServerId. Of course I could change the JSON serializer, but that would lead to an unusual / weird JavaScript code.

I kindly suggest to change GetPropertyInfo in LinqExtensions.cs so instead of direct name match p.Name == name, it should be case insensitive comparison.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant