猿问

求助, SQL转Linq

SELECT

c.id,

c.CustomersName as name,

f.FollowUpTheWay as names,

f.NextFollowDate,

f.FollowDate,

f.id as fid

from dbo.Slgl_CustomerReception as c 

left join dbo.Slgl_FollowUpRecords as f on f.CustomersId = c.id and 

    f.id = (select TOP(1) id from dbo.Slgl_FollowUpRecords where CustomersId = c.id and FollowDate <= '2011-7-20' order by id DESC)

where c.ProjectId = 9

如何转成linq 或 linq to ef 呢?

试了半天都不行


POPMUISE
浏览 275回答 2
2回答

慕运维8079593

这么复杂的sql 为什么要转呢?
随时随地看视频慕课网APP
我要回答