Briefly, if I set LazyLoadingEnabled=true when setting data context in my server code, I am getting strange JSON objects, objects with their only property being $ref instead of real JSON objects when I calling the arrays from javascript via AJAX.
Otherwise (with LazyLoadingEnabled=false), all elements are correctly returned. But problem with LazyLoadingEnabled=false is that I can’t use navigation properties at all in my server code. because I will get an runtime error saying one of navigation properties null.
So my question: Is there any way returning array with correct elements with LazyLoadingEnabled=true?
You need to get your lazy loaded navigation properties before serialization.