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 - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -