I need join in LINQ query, I have done individually but struggling to do in one process.
SQL Script
SELECT af.submission_id, af.created_date, af.surname,af.first_name
FROM app_forms af
INNER JOIN (SELECT * FROM sync_audit_log sal WHERE sal.log_Status='EP' AND sal.lookup_id IS NULL AND id=(SELECT Max(id) FROM sync_audit_log sal2 WHERE sal.submission_id=sal2.submission_id)) sal ON sal.submission_id=af.submission_id
LEFT JOIN ebs_sync es ON af.submission_id=es.submission_id
WHERE es.person_code IS NULL
LINQ
var query = (from af in _uof.Web_AppFormsRepository.GetAll()
select af).ToList();
var query2 = (from sal in _uof.Web_SyncAuditLogRepository.GetAll().Where(sal => sal.LOG_STATUS.Equals("EP") && sal.LOOKUP_ID!=null )
select sal.ID).ToList();
var query3 = (from sal2 in _uof.Web_SyncAuditLogRepository.GetAll()
select new { sal2.ID }).ToList();