I have C# list of class WeekReport. I want to group by the list data by it two property
class WeekReport
{
public int ID {get;set;}
public int Count {get;set;}
public string Client {get;set;}
public string MessageType {get;set;}
}
List wkReportList<WeekReport> = new List<WeekReport>();
So I want to group by the list data by the "Client" and "MessageType"
ex
Normal data looks like below
ID Count Client MessageType
01 101 MegaTech Missing SO
02 150 MegaTech Not shipped
03 199 NIXIMIXI No PDF
04 109 MegaTech Missing SO
05 100 NIXIMIXI Not shipped
06 107 MegaTech No PDF
07 109 NIXIMIXI Other
08 100 MegaTech Other
09 107 MegaTech No PDF
10 110 NIXIMIXI Missing SO
11 130 MegaTech Not shipped
12 100 NIXIMIXI No PDF
13 110 MegaTech Missing SO
14 130 NIXIMIXI Not shipped
15 100 NIXIMIXI No PDF
16 110 MegaTech Other
17 130 NIXIMIXI Other
18 100 NIXIMIXI Other
So it is group by the client name and message type
ID Count Client MessageType
01 101 MegaTech Missing SO
02 150 MegaTech Missing SO
03 199 MegaTech No PDF
04 109 MegaTech No PDF
05 100 MegaTech No PDF
06 107 MegaTech Not shipped
07 109 MegaTech Not shipped
08 100 MegaTech Other
09 107 MegaTech Other
10 110 NIXIMIXI Missing SO
11 130 NIXIMIXI Missing SO
12 100 NIXIMIXI No PDF
13 110 NIXIMIXI No PDF
14 130 NIXIMIXI Not shipped
15 100 NIXIMIXI Not shipped
16 110 NIXIMIXI Other
17 130 NIXIMIXI Other
18 100 NIXIMIXI Other