OData filter options (handle null or empty values)

You can compare to null using the equality operator like this: $filter=CustomerID eq null In your case the query would degenerate to something like: $filter=(CustomerID eq null) or (null eq null) Which should work, but it’s not very nice. Did you consider removing the predicate completely in such case?

Select distinct values with odata

Currently the OData protocol doesn’t support the distinct operator, or any other operator which would help with such query (assuming you’re looking for disctinct values of a primitive property on some entity). You should be able to workaround this by implementing a service operation on the server which performs such query on the underlying provider … Read more

What is the difference between OData, JsonAPI, GraphQL?

OData is a similar specification to JSON API. Both of them describe a standard protocol for creation and consumption of RESTful APIs. GraphQL is a totally different approach to API design and specifies a different way of querying API resources. OData: Designed and developed at Microsoft since 2007, standardized by the OASIS consortium. The latest … Read more

OData: Date “Greater Than” filter

Figured this out. OData V2 out-of-the-box returns dates out of SQL in JSON Date format like so: /Date(1338282808000)/ However, in order to use a date as a filter within an OData call, your date has to be in EDM format, looking like this: 2012-05-29T09:13:28 So, I needed to get the date from my initial OData … Read more

OData vs GraphQL [closed]

I have researched and also tried with Both GraphQL in Dot Net and Odata in DotNet Web API to create a working demo and What I found are Developer Usability Considering you have existing WebAPI(DotNet Framework) and want to migrate to GraphQL or OData compatible WebAPI then my answer is to choose OData because of … Read more

tech