webAPI odata query: not filtering as I hoped

251 Views Asked by At

I am attempting to query my WebAPI thus:

http://localhost/api/channels?$expand=ScheduleMetadatas&$filter=ScheduleMetadatas/any(ScheduleMetadata: ScheduleMetadata/StartDateTime gt datetime'2013-12-06T00:00:00.00')

however the query is not filtering as expected, it simply returns all child ScheduleMetadata entities for each channel entity.

what am I missing?

1

There are 1 best solutions below

3
On BEST ANSWER

You are selecting all channels, that had at least one Schedule metadata which is before a certain date. Form the channel that match it will return all schedules no matter the filter