如何将这个灵活的sql查询转换为nhibernate标准?

时间:2012-10-10 14:15:49

标签: c# nhibernate nhibernate-criteria

我有桌子at_timesheet

ID EmployeeID WorkingHours Date       ... ...// other columns
1    ID0001     08:00:00   2012-05-10 ... ...
2    ID0002     02:00:00   2012-05-10 ... ...
3    ID0001     07:00:00   2012-07-20 ... ...
...
...

我的SQL查询:

SELECT EmpID, Sum(Hour(WorkingHours)) AS WorkingTime
FROM at_test                              
WHERE Date BETWEEN @fromDate AND @toDate
GROUP BY EmpID

如何将我的SQL查询转换为NHibernate标准?

0 个答案:

没有答案