Search code examples
asp.netasp.net-web-apiodata

Support for $links on a typeless web api odata v3 implementation


I'm implementing a typeless entity on web api odata. I'm having trouble implementing the $links.

Entity(Id)/$links/AnotherEntity

I think the odata.id property that is produced when using the $format=application/json;odata=fullmetadata is the one that is shown when you use the $links but when I tried to use the $select=odata.id it throws an error that the property is not part of the object.

Am i missing any property on the request or do I have to create a new serializer for this to be supported?


Solution

  • odata.id is auto-generated with fullmetadata.

    You can't get it by $select.

    You can only get it from the response payload or generate it yourself.