Hi, Im trying to use LINQ to query Objets. I'm doing the following:
Dim myList As Generic.List(Of MyItem) = (From ThisItem In LinqToSqlObject.Items _
Join Folder In LinqToSqlObject.Folders _
On Folder.Id Equals Item.Id _
Join thisParentItem As Item In LinqToSqlObject.Items _
On thisParentItem.Id Equals Item.ItemId _
Select New MyItem With {.ItemName = Item.Name, _
.ParentItemName = thisParentItem.Name}).ToList
This however will not return any item that has a ParentItemId of null. I am trying to do a left join so as to return all "Item" regardless of whether it has a parent or not. I am aware that this is feasible in C# by adding an "into X" on the join, and selecting from X.DefaultIfEmpty(), this however does not appear to work in VB.Net.
Does anyone know how to do this?
Thanks