我正在为 asp.net 页面编写报告,并且正在尝试将此 linq 语句的结果分配给现有数据集,但我收到“在此上下文中仅支持原始类型或枚举类型”。错误信息。这是我的代码:
var contextTable = new dbpersonnelEntities();
var contextHistory = new WriterInResidenceEntities();
var rslt = (from c in contextTable.TableofOrganizationRpts
where !(from o in contextHistory.emp_history
select o.employeeID).Contains((int)c.employeeid_fk)
select c).ToList();
ReportDataSource r = new ReportDataSource("tableOfOrgDS", rslt);