I am trying to find an example of how to properly instantiate ODataNavigationLink in case it's non-empty. The only code example I've found creates a non-expanded link but doesn't bind it to any data:
//create a non-expanded link for the orders navigation property
writer.WriteStart(new ODataNavigationLink()
{
IsCollection = true,
Name = "Orders",
Url = new Uri("http://microsoft.com/Customer(" +
dataSource.Customers.First().CustomerID + ")/Orders")
});
writer.WriteEnd(); //ends the orders link
So here we specify the link to "Orders". But how do I provide the actual values for the link (in this example the link is a collection but it can also be a single entry). When I was writing the payload manually I was providing "href" attribute with a linked entry ID. I can't figure out how this is done with ODataLib.