0

How do I use group by in LINQ? I want to group by tow filed of table in C# by linq.

4

1 に答える 1

1
var query =
    from t in db.tableName    
    group t by new { t.column1, t.column2 } into g
    select new { g.Key.column1, g.Key.column2 };
于 2012-04-23T10:00:44.640 に答える