我试图将此查询从MS-SQL转换为实体
这是原始查询:
SELECT sys_id
FROM table1
inner join table2 on table1.client_id = table2.client_id
and table1.local_seq = table2.local_seq
WHERE table1.client_id = @ClientID
这是转换为Entity的代码
var dbListingSysId = (from type in db.table1
join borrower in db.table2 on new { type.client_id, type.local_seq } equals new { borrower.client_id, borrower.local_seq }
where type.client_id == clientId
select new {type.listingid }).ToList();
但我得到错误:
查询正文必须以select子句或group子句结尾