group by on joined structure does not work
I wrote some code making a join (using the library) between two tables from data context exporting the result columns as object fields. EXAMPLE:
tableA = { field1 = "", field2 = ""}
tableB = { field1 = "", field2 = ""}
var join = { tableAfield1 = "", tableAfield2 = "", tableBfield1 = "", tableBfield2 = ""}
When I try to group the obtained IQueryable collection by a selector (for example "tableBfield1"), I get the following exception: "client-side group by is not supported".
I tried to convert the IQueryable
Then, I tried to cast the joined collection object type to a dynamically defined type, having the same column names and types) using the method "OfType()", but it does not work.
What I mean is that I could not translate IQueryable
So in these days I've been wondering about the following questions: • Is there a way to export a join IQueryable collection of a given type? • Is there a way to cast my join collection of an anonymous object to a type? • do i need to compose my own expression tree to make the group by work on IQueryable?
Thanks for helping guys!
Hello @stefanoyoyo,
Can you please provide a full working example which describes this issue?
Hello @stefanoyoyo,
Can you please provide a full working example which describes this issue?