Goal: Group by 2 columns
Error: This causes the error IGrouping does not contain a definition for 'Sub_ID' and no extension method 'SubID' accepting a first argument of type IGrouping
Code:
return db.View.Where(m => m.Mem_ID == Some_MemID && m.Last_Name.ToLower() == Search_MemLastName.ToLower()).GroupBy(t => new { t.Sub_ID, t.Mem_Seq }).OrderBy(t => t.Subs_ID);
I've also tried adding .key but that did not help. Did not find a solution in How to order IGrouping without changing its type? or IGrouping does not contain a definition for
Been looking at this for hours