I create a Menu class that has a self-relation.
Public Class Menu
Sub New()
Me.lstmenu = New List(Of Menu)
End Sub
Property MenuID As Integer
Property Title As String
Property Description As String
Property URL As String
Property lstmenu As ICollection(Of Menu)
End Class
Entity Framework code-first creates a table from this class with a self relation.
I want to write a query with Linq to return me all menus that their foreign key are null but all I have is a lstmenu that hold a list of menus. And I can't find any FK column to use in my query.
Please help me how to write a query to find all records that their foreign key are null.
