Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How do I use group by in LINQ? I want to group by tow filed of table in C# by linq.
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 };