Hi is there anyway to write somthing like this
var r = from i in myList
group i by i.Number
into grp
select new
{
Reported = grp.Select(x => x.CurrentStatus).First(),
Number = grp.Key,
Sum = grp.Sum(x => x.Details[0].Quantity),
Name = grp.Select(x => x.Name).First(),
Details = grp.Select(x => x.Details).First(),
Descriptions = grp.Select(x => x.Descriptions).First(),
AssignmentId = grp.Select(x => x.AssignmentId).First(),
Listor = grp.Select(x => x.Number).Count()
};
into this
var r = from i in myList
group i by i.Number, i.CurrentStatus
into grp
select new
{
Reported = grp.Select(x => x.CurrentStatus).First(),
Number = grp.Key,
Sum = grp.Sum(x => x.Details[0].Quantity),
Name = grp.Select(x => x.Name).First(),
Details = grp.Select(x => x.Details).First(),
Descriptions = grp.Select(x => x.Descriptions).First(),
AssignmentId = grp.Select(x => x.AssignmentId).First(),
Listor = grp.Select(x => x.Number).Count()
};
so that i can group by " group i by i.Number, i.CurrentStatus"