Hello everyone can anybody please help me to convert this sql to linq I thnink my biggest problem comes from the not exists statement in sql to linq
select count(distinct(GroupID)) from ParticipantModulequestionnaire pmq
inner join ParticipantGroupMember pgm on pmq.participantid = pgm.ParticipantID
where pmq.moduleid = 46 and not exists
(select unf.participantid from ParticipantModuleQuestionnaire unf where unf.ParticipantID = pmq.ParticipantID
and unf.ModuleID = 46
and isnull(unf.completedflag,0) <> 0)
Thank you all
You can just do a subquery and check that
Any()is false. I think this should do it (there will be a couple of minor tweaks necessary to fit it to whatever your context is).