Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

asp.net core api Self referencing loop detected for property

public class StaffMember
{
    public string FirstName { get; set; }
    public virtual Department Department { get; set; }
}

public class Department
{
    public string DepartmentName { get; set; }
    [JsonIgnore]
    public virtual ICollection StaffMembers { get; set; }
}
Source by dotnetcoretutorials.com #
 
PREVIOUS NEXT
Tagged: #core #api #Self #referencing #loop #detected #property
ADD COMMENT
Topic
Name
5+4 =