I can't seem to translate this to LINQ:
select stuff
FROM history INNER JOIN profiles ON history.username = profiles.username
LEFT OUTER JOIN files ON history.fileid = files.filename
LEFT OUTER JOIN streams ON streams.identifier = history.fileid
LEFT OUTER JOIN galleries ON galleries.identifier = history.fileid, subscribers
WHERE stuff
I'm having a hard time following examples of left outer joins. They don't explain whats going on, just what to do in their hypothetical situation. Any help / explanations would be much appreciated.
Here's how I started, the last line (from files in JoinedFiles.DefaultIfEmpty()) won't let me compile. 'Type inference failed in the call 'SelectMany' it says. Why so complicated? =(
var x = from h in db.Histories
join prof in db.profiles on h.username equals prof.username
join files in db.NeebitFiles on h.fileid equals files.filename into JoinedFiles
from files in JoinedFiles.DefaultIfEmpty()
...?