How to determine if Navigation Property in the Entity Framework is set without loading the related records

后端 未结 2 818
庸人自扰
庸人自扰 2021-01-04 11:51

I\'m not sure about Navigational Properties in EF 4 so I would kindly ask you an explanation.

Lets imagine this scenarios:

A)

I have two Entities

2条回答
  •  爱一瞬间的悲伤
    2021-01-04 12:51

    Do you mean:

    // -to-one relationship
    entity.RelatedItemReference.IsLoaded
    
    // -to-many relationship
    entity.RelatedItems.IsLoaded
    

提交回复
热议问题