How do I write this in linq:
SELECT
c.customerNumber,
IsNull(l.loanNumber, '') AS loanNumber,
dd.documentTypeName,
dd.documentSubTypeName,
d.filename,
(SELECT propertyId FROM SystemProperties WHERE propertyKey LIKE 'acculoan.inputType.Other') AS inputType
FROM
document AS d INNER JOIN qryDocumentDefinitions AS dd
ON d.documentDefId = dd.documentDefId
AND d.documentId = @DocumentId
INNER JOIN customer AS c
ON c.customerId = d.customerId
LEFT OUTER JOIN loan AS l
ON l.loanId=d.loanId
Help needed with the isnull especially and the nested select.
Many thanks in advance..!