This question is locked. New answers and comments are not allowed.
Hi everyone,
We would like to use the MVC Grid in our application but we face some problems :
We are use EF 4 Code first. We have some object that have some relationships to intermediate object and this intermediate table has a link to the other end of the relationship.
For example :
We have an object Study
Class StudyGroup
and the class Group :
Since both end of relation has a navigation property, this cause cycles when trying to convert to JSON.
How are we supposed to solve this issue ?
Thanks
We would like to use the MVC Grid in our application but we face some problems :
We are use EF 4 Code first. We have some object that have some relationships to intermediate object and this intermediate table has a link to the other end of the relationship.
For example :
We have an object Study
public class Study{ public int Id; public virtual ICollection<StudyGroup> StudyGroups; // Class simplified for clarity}Class StudyGroup
public class StudyGroup{ public int Id; public virtual Study Study; public virtual Group Group}and the class Group :
public class Group{ public int Id; public virtual ICollection<StudyGroup> StudyGroups;}Since both end of relation has a navigation property, this cause cycles when trying to convert to JSON.
How are we supposed to solve this issue ?
Thanks