如何为以下 SQL 查询语句编写流畅的 nhibernate 查询:
select iseat.companynr, mdata.Employeenr from IDepartment as iseat inner join
Employee as i on i.pkey = iseat.employeefk
inner join employeedata as edata on edata.employeefk = i.pkey
我已经创建了类IDepartment
,Employee
并且Employeedata
还创建了一个类CompanyNr2EmployeeNrMap
,其中包含 2 个属性CompanyNr
和EmployeeNr
.
该查询需要将 companynr 列表作为参数并返回CompanyNr2EmployeeNrMap
.