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
Post a Comment