TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sreenivasa k
890
893
34.2k
DeSerialization for circular reference entities
Jul 2 2017 11:14 AM
i have an xml and want to deserialize object. below is the xml
<school>
<students>
<stundent>
<name>James</name>
<student>
<name>Jason</name>
<student>
<name>Daniel</name>
</student>
</student>
</student>
</students>
</school>
Entity design:
[CollectionDataContract]
public class school
{
[XmlElement]
[DataMember]
public students students{get;set;}
}
[DataContract]
[Serializable]
[XmlType(TypeName="students")]
public class stundents{
[XmlElement]
[DataMember]
public student
student{get;set;}
}
[DataContract]
[Serializable]
[XmlType(TypeName="student")]
public class student
{
public string name{get;set;}
}
I have used
IsReference=true but did not get the expected result.
Reply
Answers (
1
)
What is Managed or Unmanaged Code?
Using Automapper \ Linq .Include to retrieve specific data