Link to home
Start Free TrialLog in
Avatar of Ruffone
Ruffone

asked on

How do i fill data into navigation property

How do I do EagerLoading of this object
Public Class Person 
    Public Overridable Property personId As Integer
    Public Overridable Property nameType As String

   Public Overridable Property Names As IList(Of PersonNameType)

End Class

Public MustInherit Class PersonNameType
    Public Overridable Property personId As Integer
    Public Overridable Property nameId As Integer

    <ForeignKey("personId,personGuid")>
    Public Overridable Property Person As Person
    <ForeignKey("nameId,nameGuid")>
    Public Overridable Property Name As Name

End Class

Open in new window


I tried doing this but the navigation properties (Person/Name) of "Person.Names" is not getting filled. I mean when I drill into the Person.Names and one of the collection item the personId/NameId has data but the Person/Name properties has nothing. How do I fill that data in?
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.