SQL到NHibernate Criteria查询转换

时间:2012-10-09 08:25:21

标签: sql nhibernate

请帮我把这个SQL转换为Nhibernate中的Criteria。如果你有任何文件教导如何做,请给我:

select distinct visa 
from employee e ,
    (select NumberOfEmployee,GroupLeaderId
     from [Group] as G JOIN
        (select count(distinct employeeid) as NumberOfEmployee, GroupId
         from [Project]  p JOIN [EmployeeFunctionInProject] e
         ON p.ProjectId = e.ProjectId
         group by p.ProjectId,Name,GroupId )
               as P
     ON G.GroupId=P.GroupId
          and NumberOfEmployee >=3) as Result
where e.EmployeeId = Result.GroupLeaderId

1 个答案:

答案 0 :(得分:0)

加入本声明中使用的查询和分组子句

association and sub-query

refer

代表 join refer