Lazy Loading multiple relationships back to a single table

16 views
Skip to first unread message

Lance Johnson

unread,
Sep 1, 2017, 5:32:24 PM9/1/17
to Simple.Data
I have a question about Lazy Loading in regards to a scenario where let's say I have the following tables and columns.

Table Person
Column PersonId
Column PersonName

Table Relationship
Column RelationshipId
Column PersonFromId
Column PersonToId

Given this if I were to try and do lazy loading, I would normally do something like:

database.Relationship.Person

However, in this scenario I have 2 relationships back to Person for PersonFromId and PersonToId.  Is there a way to still get this to work with Lazy Loading or will I have to specify the joins?
Reply all
Reply to author
Forward
0 new messages