2

I followed Getting started with WCF Web API. Everything works well and it supports some of the operators like

?$filter=Name eq 'Ajay'

?$top=4

But when I try other queries like

$filter=substringof('Ajay', Name)

OR

$filter=length(Name) gt 5

It gives following error

The server encountered an error processing the request. See server logs for more details.

But same queries work well with other ODATA services like Netflix. Does WCF Web API support only a limited set of queries, or I am missing something?

ckittel
  • 6,478
  • 3
  • 41
  • 71
Ajay Bhosale
  • 1,872
  • 24
  • 35

1 Answers1

3

Yes preview 4 only supports a subset of the OData query options. However, there is a new Preview 5 available as of last week and it has additional OData support. I'm not sure if all of the query options are now supported but it is worth checking out.

Darrel Miller
  • 139,164
  • 32
  • 194
  • 243
  • Thanks, can you please point to a link which lists the options, I am not able to get any on CodePlex site. – Ajay Bhosale Sep 06 '11 at 14:16
  • 1
    The ODataQueryDeserializer is the class that extracts the query operations from the URI. http://wcf.codeplex.com/SourceControl/changeset/view/0930afa6b1ab#WCFWebApi%2fHttp%2fSrc%2fMicrosoft.ApplicationServer.Http%2fmicrosoft%2fApplicationServer%2fQuery%2fODataQueryDeserializer.cs – Darrel Miller Sep 06 '11 at 14:47