i try to convert my SQL code to linq but i cannot:
Alter PROCEDURE sp_MatchCTallyToTask
AS
BEGIN
select * from Task where MPDReference in( select MPDReference from Task
intersect
select ENG_CUSTOMERTALLY_CUSTOMERTASKNUMBER from dbo.ENG_CUSTOMERTALLY)
END
GO
public List<Task> TaskList()
{
return engCtx.Tasks.Where(t => t.MPDReference.Contains(engCtx.ENG_CUSTOMERTALLies.Select(c => c.ENG_CUSTOMERTALLY_CUSTOMERTASKNUMBER).
Except(engCtx.Tasks.Select(tsk => tsk.MPDReference).AsQueryable())).ToList());
}