How to multiple Group by in LINQSaber Shaikh11yAsked Dec 16, 2014, 12:37 AM1.4kLINQ How to multiple Group by in LINQ Cust_Id Order_Id Product_ID Price 1 1 1 200 1 2 2 300 1 3 3 5004 RepliesKnow the answer? Post it — somebody with the same question will find it here.Sign in to answer this questionIt is the same account you read, post and publish with — and you will come straight back to this page.Sign inCreate an accountPrakash Lakshmanan11y agoPosted Dec 16, 2014, 5:34 AMAccepted answerRefer below link : http://msdn.microsoft.com/en-us/library/bb545974.aspx0Rahul Singh11y agoPosted Dec 17, 2014, 1:04 AMYou mean just "Order_Id"? Considering this:- var query = from c in customers group c by c.Order_Id into g select new { OrderId = g.Key Orders = g.ToList() };0Saber Shaikh11y agoPosted Dec 16, 2014, 11:36 PMGroup By Order OrderId Of Customer0Rahul Singh11y agoPosted Dec 16, 2014, 8:27 AMHi Saber, Can you let me know the expected output? On what all columns your looking to group?0
Prakash Lakshmanan11y agoPosted Dec 16, 2014, 5:34 AMAccepted answerRefer below link : http://msdn.microsoft.com/en-us/library/bb545974.aspx0
Rahul Singh11y agoPosted Dec 17, 2014, 1:04 AMYou mean just "Order_Id"? Considering this:- var query = from c in customers group c by c.Order_Id into g select new { OrderId = g.Key Orders = g.ToList() };0
Rahul Singh11y agoPosted Dec 16, 2014, 8:27 AMHi Saber, Can you let me know the expected output? On what all columns your looking to group?0
Prakash LakshmananPosted Dec 16, 2014, 5:34 AM
Rahul SinghPosted Dec 17, 2014, 1:04 AM
Saber ShaikhPosted Dec 16, 2014, 11:36 PM
Rahul SinghPosted Dec 16, 2014, 8:27 AM