错误:查询正文必须以select子句或group子句结束

时间:2017-10-11 09:31:18

标签: c# sql-server entity-framework

我试图将此查询从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子句结尾

0 个答案:

没有答案