List lst_GrandResultAttendance = new List();
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 New_lst_GrandResultAttendance = new List();
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 |

Biplob BipulPosted Oct 13, 2015, 5:06 AM
Mukesh KumarPosted Oct 12, 2015, 1:47 AM
var queryLastNames =orderby newGroup.Keyselect newGroup;