c# - Entity Framework 6 Load child table to one level to avoid Self referencing loop detected for property -


i have entities organized below.

class parent {  public virtual icollection<child> childlist { get; set; } }  class child {  public virtual parent p { get; set; } } 

here when serialized, error of

self referencing loop detected property

so need tell entity framework fetch me first level of data, i.e. when accessing parent class, fetch parent object childs , keep parent object in child null.


Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -