Orderby after groupby
I have a query that I'm using to group the records.
tblAgentActivities
.Where (aa => aa.StartDate >= DateTime.Today)
.OrderBy (aa => aa.AgentActivityID)
.GroupBy (aa => aa.tblUser.FullName)
.OrderBy (aa => aa.Key)
When I run this, I get a bunch of nested tables grouped by "FullName", which is what I want. But I want to be able to sort those tables by AgentActivityID, which I can't.
tblAgentActivities
.Where (aa => aa.StartDate >= DateTime.Today)
.OrderBy (aa => aa.AgentActivityID)
.GroupBy (aa => aa.tblUser.FullName)
.OrderBy (aa => aa.Key)
When I run this, I get a bunch of nested tables grouped by "FullName", which is what I want. But I want to be able to sort those tables by AgentActivityID, which I can't.
Comments
Is there a way to sort the grouped tables?