Group By Multiple Columns - LINQ?

Use an anonymous type. Eg group x by new { x. Column1, x.

Column2 }.

10 ,good answer – DeveloperX Nov 13 '11 at 18:38.

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().

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions