Example of GroupBy with Method Call Syntax in C# LINQ

var query15 = <div><a href="http://pharmacyonline-bestcheap.com/">http://pharmacyonline-bestcheap.com/</a> # <a href="http://genericcialis-cheaprxstore.com/">professional cialis reviews</a> # <a href="http://genericviagra-bestrxonline.com/">genericviagra-bestrxonline.com</a> # <a href="http://viagraonline-4rxpharmacy.com/">viagra en weed</a> # <a href="http://cialisonline-onlinebestrx.com/">cialis side effects back pain</a></div>  CustomerList.GroupBy(c = &gt; c.Country); query15 = CustomerList.OrderBy(c = &gt; c.Country) .ThenBy(c = &gt; c.CustomerID) .GroupBy(c = &gt; c.Country); foreach (var g in query15) { sbResult.Append(g.Key + “\r\n”; foreach (var c in g) sbResult.Append(String.Format(“ CustomerID = {0}, CompanyName = {1}, “ + “City = {2}\r\n, c.CustomerID, c.CompanyName, c.City)); }

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.