inheritance - How do you Expose Inherited Entities using WCF and OData? -
if have odata inheritance hierarchy exposed wcf data services how expose subclass entity own entity set? uri should use access it?
let's have odata url follows:
let's have entity foo abstract , entity bar subclass of foo.
what i'd go url http://myodataservice.svc/bar access bar object seems not possible. can point me @ simple example can see how works?
each entity instance can belong 1 entity set. can have multiple entity sets share same type (or base type), sets of entity instances must not overlap. if need have entity set contains entity instances of base type, still want sometime access entity instances of derived type, can use type cast path segment.
this requires odata v3, can this:
http://myodataservice.svc/baseentities/namespace.derivedtype
this url acts entity set of entities baseentities entity set, filtered derivedtype instances. typed (the type of url collection of derivedtype instances). can use other entity set url, can further navigate using / or can append of query operators $filter, $select , on.
Comments
Post a Comment