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.
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.