WCF DataContract Serializer and IsReference property

One of the new features of .NET framework 3.5 SP1 is the possibility to serialize an object graph with circular references by using the standard xsd:ID/xsd:IDREF attributes.

Just mark your DataContract attribute with the IsReference=true property:


    public class Room



        public string description { get; set; }


        public Devices roomDevices { get; set; }


 Check out this post by Zulfiqar for more examples.

Leave a Reply

Your email address will not be published. Required fields are marked *