查找表中出现的所有不同人员,这些人员负责创建连接更多或更多人员和实体项目的负责实体?
如何在技术中转换 sql 查询?sql查询是
select distinct p.PersonID,p.FirstName,p.LastName
from Responsible tr inner join People p on p.PersonID=tr.People_PersonID;
我的尝试是
string query = @"SELECT value empl
FROM TicketBaseEntities.Responsible AS tr
INNER JOIN TicketBaseEntities.People AS empl
on empl.PersonID =tr.Responsibles.People_PersonID where tr.Responsibles !=null";
return Context.CreateQuery<Employee>(query).Distinct();
错误信息是:
“People_PersonID”不是“Transient.collection[TicketBaseModel.Person(Nullable=True,DefaultValue=)]”的成员。要提取集合元素的属性,请使用子查询来迭代集合。接近简单标识符,第 5 行,第 63 列。