Hi!
I'm having trouble retrieving the nodes from a property of type "Content children".
In order to retrieve the children of "MyClass", I created a property "MyChildren" which reflects the contents of "Children". The new property as well as both the classes in the relation are exposed to OData. I tested this by querying the OData directly like so:
http://fakedomain.com/odata/MyClass(2451)/MyChildren
In the code however, it's a different story. First of all, the OData stream is added as a service reference, and the OData is queried through the generated c# objects. When I browse the objects I can drill down to my class and the property I created is there, only there are two of them: MyChildren and MyChildrenCount. The interesting thing is that when I debug the code the first property is empty while the second one (MyChildrenCount) shows 8. You can see this in the screenshot (btw. the class and property names are different, I just changed them to simplify the example).
Contents odata = new Contents(new Uri("http://fakedomain.com/odata"));
var myClass = odata.MyClass.FirstOrDefault();
var MyChildren = myClass != null ? myClass.MyChildren : null;
if (MyChildren != null)
{
var output = (from child in MyChildren
select new
{
id = child.Id,
title = HttpUtility.HtmlEncode(child.Name.Trim())
}).AsEnumerable().Reverse();
_json = new JsonFx.Json.JsonWriter().Write(output);
}