Home

Help with Group by... and moving code to Visual Studio...

edited July 2020

Hi,
I've still got my trainer wheels on as a LINQ programmer... and for C# in some ways too...

I have a need to run a query that involves several table joins, and I would like to "group by" on several levels (up to 5). So far, I have failed

So... first question: is there any examples of doing this? The sample scripts don't really cover this level of complexity (I think)...

Next issue: moving code to VS to make an app... I have followed the example given here This approach created a class/table for the query results... is that ALWAYS required?

My code requires me to iterate over each "group"...which I currently do without the niceness of foreach, as I end up with a flat result set with all fields. Works... but not pretty. And, My real hope is that the if I can get hte LINQ group-by working, I can group on say 4 levels... and not the 15 fields I currently do... which I suspect is what is making the query run SO SLOWLY ;-(

Appreciate any tips,
T.

Sign In or Register to comment.