Is there a way to sort EntityQuery using property name strings?
Seriously, I have an EntityQuery and the name of a property. I need to call OrderBy with only the name of a property. How can I do this? Reflection gives me the following exception:
System.NotSupportedException: Method
‘GetValue’ on type
‘System.Reflection.PropertyInfo’ is
not accessible. Only methods on
primitive types, System.Math and
System.Convert are supported in
queries.
You have to build an expression tree like this.
You should replace T with your type, this is not generics example.