Problem: Getting error
"No overload for method 'GroupBy' takes 6 arguments"
A lot of the SO articles are for specific user created methods. GroupBy is part of the library.
I've tried varying the number of arguments. If I change it to 2 arguments, then the errors points to the next area where it has OrderByDescending and gives the error:
"IGrouping does not contain a definition for 'Start_Date' and no extension method 'Start_Date' accepting a first argument of type 'IGrouping' could be found."
The code that gives this error is:
var someVariable = DbContextObject.View.Where(
m =>
m.Some_ID == CurrentlyEditingSomeID
).GroupBy(d=> d.Start_Date,f=>f.Some_ID).AsQueryable().OrderByDescending(m => m.Start_Date);
To be used in a ListView
You need to create anonymous object with list of all fields to be included in group by, then access those fields using Key property of grouped list, something like below -