I have generated my POCO entities using POCO Generator, I have more than 150+ tables in my database. I am sharing POCO entities all across the application layers including t
I had the same problem and resolved it by excluding the navigation property back to the parent from the DataContract
[DataContract]
public partial class Parent
{
[Key]
[DataMember]
public virtual int ParentId { get; set; }
[DataMember]
public virtual string ParentName { get; set; }
[DataMember]
public virtual Child Child { get; set; }
}
[DataContract]
public partial class Child
{
[Key]
[DataMember]
public virtual int ChildId { get; set; }
[DataMember]
public virtual string ChildName { get; set; }
public virtual List Parents {get; set;}
}