-1
我與SQL查詢轉換爲LINQLinq-加入,MAX(日)
SELECT * FROM Log x
JOIN (SELECT p.objId,
MAX(modifiedDateTime) AS latestDateTime
FROM Log p
GROUP BY p.objId) y ON y.objId= x.objId
AND y.latestDateTime = x.modifiedDateTime
請建議掙扎。這是我到目前爲止的地方
var query1 = from x in query
join y in query
on new {x.objId, x.modifiedDateTime}
equals new {y.objId, ...(Max)}