using LINQ to NHibernate does anybody know how to use group by and order by in the same expression. I am having to execute the group by into a list and then order this, seem that I am missing soemthing here ???
Example:-
Private function LoadStats(...) ...
Dim StatRepos As DataAccess.StatsExtraction_vwRepository = New DataAccess.StatsExtraction_vwRepository
return (From x In StatRepos.GetAnswers(Question, Questionnaire) _
Group x By xData = x.Data Into Count() _
Select New ChartData
With {.TheData = xData,
.TheValue = xData.Count}
).ToList.OrderBy(Function(x) x.TheData)
End Sub