Dynamic Linq on List<dynamic> #464
Unanswered
Bugattisport1
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have some code here that executes a SQL statement and then converts the data into JSON and then finally into a List of JSON objects.
This method is executed from within the rule like this:
The source parameter loads fine, but then when I try to write a dynamic linq query in the result parameter (as shown above), I keep getting compile errors. My suspicion is that dynamic linq does not support objects of type
List<dynamic>
, because when I change mySQLToJson.executeCommand
method to return aList<linksTable>
(non-dynamic type) then the query in the result parameter works.The issue is that now my
executeCommand
method is hardcoded to only support a table of thelinksTable
type... but I want to be able to support any table hence why I originally tried building aList<dynamic>
of JSON objects.Does anyone know of a workaround so that my dynamic linq query can work on any table without having a C# class defined for it?
Beta Was this translation helpful? Give feedback.
All reactions