So I have been struggling with this one all morning. I have read a few articles and I roughly basing my work off of this one:
This is my current error:
A circular reference was detected while serializing an object of type 'System.Data.Entity.DynamicProxies.Order_C00CE366506BD8C6592A3CF21B9D1C5921D31C03D7322A8F6E8EAD72E113EA95'.
Here is the class:
public class Order
{
[Key]
public int OrderId { get; set; }
public int PatientId { get; set; }
public virtual Patient Patient { get; set; }
public int CertificationPeriodId { get; set; }
public virtual CertificationPeriod CertificationPeriod { get; set; }
public int AgencyId { get; set; }
public virtual Agency Agency { get; set; }
public int PrimaryDiagnosisId { get; set; }
public virtual Diagnosis PrimaryDiagnosis { get; set; }
public int ApprovalStatusId { get; set; }
public virtual OrderApprovalStatus ApprovalStatus { get; set; }
public int UserId { get; set; }
public virtual User Approver { get; set; }
public int SubmitterId { get; set; }
public virtual User Submitter { get; set; }
public DateTime ApprovalDate { get; set; }
public DateTime SubmittedDate { get; set; }
public Boolean IsDeprecated { get; set; }
}
I am assuming that I have do something with the "Fluent API." I unfortunately am not fluent with the Fluent API and so I wanted to validate that this is in fact what is missing.
Thanks,
Guido