I am very new to LINQ ,I have made alot of unsuccessful attempts to convert a SQL query to LINQ.. Please help me out with some solution.What is the exact LINQ for this .. Thanks in advance.
// Just a part of the entire query
select distinct p.IdPatient,p.IdDoc
from patd p (NOLOCK)
left outer join StatusChange sc (NOLOCK)
on sc.IdPatient = p.IdPatient
and sc.IdClinicNumber = 23430
and sc.IdStatus = 'A'
and sc.DateStatusChange > GetDate()
join TrtTyp t ON p.IdTreatmentType = t.IdTreatmentType
and t.TypeModality IN ('H','P')
Where
p.IdType IN ('P','E','M')
and (IsNull(p.IsInactive,0) in (1,0) or sc.IdStatusChange is not null)
and Not Exists(
Select 1
From Expire e (NOLOCK)
Where e.IdPatient = p.IdPatient
)
and p.IdClinicNumber = 23430