List<Qry_GrandResultAttendance> lst_GrandResultAttendance = new List<Qry_GrandResultAttendance>();
lst_GrandResultAttendanceDetails = GetGrandResultAttendanceDetails(version, session, branch, shift, _class, group, section).ToList();
"lst_GrandResultAttendanceDetails" variable contains below content...
Present | SiNo | Name | Date |
1 | 1 | a | 1-1-2015 |
1 | 1 | a | 2-1-2015 |
1 | 1 | a | 3-1-2015 |
1 | 2 | b | 1-1-2015 |
1 | 2 | b | 2-1-2015 |
1 | 3 | c | 1-1-2015 |
1 | 3 | c | 2-1-2015 |
| | | |
| | | |
| | | |
now I want that Grouping by "SiNo" and Count , As like as List<Qry_GrandResultAttendance> New_lst_GrandResultAttendance = new List<Qry_GrandResultAttendance>();
New_lst_GrandResultAttendance= lst_GrandResultAttendance.Group By (SiNo).Count......(How Linq Wrrite there), which output of "New_lst_GrandResultAttendance" below List.
Present | Si | Name | Date |
3 | 1 | a | |
2 | 2 | b | |
2 3 c