OrderBy After Group?

Posted by Soo on Stack Overflow See other posts from Stack Overflow or by Soo
Published on 2010-06-15T17:53:52Z Indexed on 2010/06/15 18:02 UTC
Read the original article Hit count: 321

Filed under:
|

Ok, so I have a table

Table:
Id
Value

If I query my table and group my result by "Value" how can I make it so each of the groups are alphabetized (a group grouped by a "Value"="a" will come before a group grouped by a "Value" = "z").

My current query looks something like this:
var Result = 
from a in DB.Table
orderby a.Value
group by a.Value into b
select new {Groupz = b};

© Stack Overflow or respective owner

Related posts about c#

Related posts about LINQ