I've wrote before about trying to serialize EF objects to JSON ( post in Hebrew ), which to conclude, isn't that easy. DataContractJsonSerializer EF objects are marked with IsReference=true and therefore cannot be serialized with DataContractJsonSerializer. Trying to serialize EF objects with that serializer throws the following exception: "The type 'xxx' cannot be serialized to JSON because its IsReference setting is 'True'. The JSON format does not support references...
בחודשים האחרונים אני עובד על בניית תשתית המבוססת על Ado.Net Entity Framework (ראו פוסט קודם בנושא), כרגע בגרסה שהופצה עם Visual Studio 2008 SP1 Beta 1 ולפני כן עם גרסת ה-Beta 3. מאחר והפרויקט הוא WEB-י, מבוסס ASP.NET Ajax (עם שדרוג קטן שלנו), אחד השלבים שהיינו צריכים לעבור בדרך הוא איך להעביר אובייקטי Entity Framework לצד קליינט כאשר הם מסורלזים ל-JSON לאחר כמה נסיונות, התברר שבגרסת ה-Beta 3 של ה-Entity Framework קיימת בעיה לבצע סריאליזציה לכל טיפוס המכיל Association (בין אם Reference או Collection...