我正在尝试将SQL查询转换为NHibernate QueryOver语法,但我不明白如何按计数投影进行排序.
这就是SQL Query的样子:
select top 10 v.intVoteUserID, COUNT(v.intVoteUserID)
from Group_MessageVotes v
where v.dtmVote > :date
group by v.intVoteUserID
order by COUNT(v.intVoteUserID) desc
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?