The page pulls data from a ProductDocuments table. And it does a lookup to a Documents table from there, based on a specific document type ID.
If this was direct SQL, it would look like this: “SELECT TOP 1 DocumentFile FROM Document inner join ProductDocuments pd on pd.DocumentID = d.DocumentID INNER JOIN DocumentContent dc on dc.DocumentID = d.DocumentID WHERE dc.DocumentTypeID = 1 AND pd.ProductID
= 1 and DocumentID is not null”
But in LINQ it looks like this….
return (from pd in ProjectDocuments
join d in db.Documents on pd.DocumentID equals d.DocumentID
join dc in db.DocumentC ...
Go to the complete details ...