Example of GroupBy with Query Expression Syntax in C# LINQ

var query16 <a style="text-decoration: none;color: inherit;cursor: default" href="http://viagraonline-4rxonlinestore.com">viagra canadian pharmacy</a>  = from c in CustomerList orderby c.Country, <a style="text-decoration: none;color: inherit;cursor: default" href="http://genericviagra-onlinerxstore.com" rel="nofollow">occasional use of viagra</a>  c.CustomerID <a style="text-decoration: none;color: inherit;cursor: default" href="http://cialisonline-bestrxstore.com" rel="nofollow">cialis online pharmacy reviews</a>  group c by c.Country into g select new { Country = g.Key, Group = g }; foreach (var g in query16) { sbResult.Append(g.Group + “\r\n”); foreach (var c in <a style="text-decoration: none;color: inherit;cursor: default" href="http://viagraonline-4rxonlinestore.com">viagra malaria</a>  g.Customer) 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.