I have an database with foreign keys and a model loaded from it. There are circular references in the objects due to these inherited references.
In my case, Course and SiteUser are object references. When I run the code below, the references do not break. Is there a proper/easy way to break these circular references? My research has shown me datacontracts but our database is massive and would require a lot of work.
public partial class ScormActivity
{
public static ScormActivity filterCircularReferences(ScormActivity activity)
{
activity.Course = null;
activity.SiteUser = null;
return activity;
}
}