Present in both answers;Present only in the new answer;Present only in the old answer;
var query = from row in table.AsEnumerable() group row by row.Field<string>("RoomName") into grp select new { RoomName = grp.Key, WeekDuty = grp.First().Field<string>("WeekDuty") };
Ok got this as: var query = (from t in Transactions group t by new {t.MaterialID, t.ProductID} into grp select new { grp.Key.MaterialID, grp.Key.ProductID, Quantity = grp.Sum(t => t.Quantity) }).ToList();
Present in both answers;Present only in the new answer;Present only in the old answer;