SELECT
CP.POSITION_ID,
(SELECT
ENDTIME
FROM
check pc
WHERE
pc.code= wp.code
ORDER BY
ENDTIME DESC
LIMIT 1
) AS ENDTIME,
FROM
cposition cp
var query =
from cp in context.cposition
select new{
POSITION_ID = cp.POSITION_ID,
ENDTIME = (from pc in context.check
where cp.code == pc.code
orderby ENDTIME descing【这个 你智能提示看下吧,忘了怎么写了,这个关键字】
select pc.ENDTIME).FirstOrDefault()
}