Defining a Left Join with LINQ Queries (
Page 4 of 4 )
Summary
To implement a left join in LINQ use two sequences, an into clause, and DefaultIfEmpty. That’s all there is to it. (Now I have to go. I have to copy my Tito Puente and Burt Bacharach songs to my iPod.)
Biography
ADVERTISEMENT
Paul Kimmel is the VB Today columnist for www.codeguru.com and has written several books on object-oriented programming and .NET. Check out his upcoming book LINQ Unleashed for C# due July 2008. Paul is an application architect for Electronic Data Systems in Lansing, Michigan. You may contact him for technology questions at pkimmel@softconcepts.com.
If you are interested in joining or sponsoring a .NET Users Group, check out www.glugnet.org. Glugnet opened a users group branch in Flint, Michigan in August 2007. If you are interested in attending, check out the www.glugnet.org web site for updates.