c#,left,join,linq

Kubilay 7/10/2018 0

This code block shows how to left join in c# using linq

C#
 List<File> files = (from f in db.Files
                                    join cf in db.ContentFiles on f.Id equals cf.FileId into leftj
                                    from lj in leftj.DefaultIfEmpty()
                                    where f.CreateDate < dt1 && f.CreateDate > dt2 && lj ==null  
                                    select f).ToList(); 

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments