2
votes

Whilst I'm crawling through the OData Spec's URI syntax looking for an answer, I thought it might be worth asking in case nothing turned up.

If I have an entity: "base", and an entity which inherits from base: "Derived" I end up with an Odata query which can retrieve all instances of base:

blah.svc/bases()

but what query can I use to return just those instances of Derived? I've tried variuos forms of:

blah.svc/bases()?$filter=isof(Derived)

but to no avail.

Unfortunately, I'm struggling to find examples of this on the web, most of the stuff out there just talks about how you can't have navigation properties on derived entites (which isn't even true anymore!!)

Thanks in advance.

1

1 Answers

3
votes

you can do the following: blah.svc/bases/Model.Derived - Model.Derived is the full name (namespace+name) of the derived type in the model.

Hope this helps.

Thanks Pratik