Search code examples
wcflinqodata

What are the query limitations of OData in WCF?


I would like to know, in a nutshell, a summary of the limitations of using OData from the point of view of the query. For example:

  • Can I do recursive queries?
  • What subset of LINQ features it includes?

I found that the specs are very long to analyze.


Solution

  • Well, when you ask about the query limitations of OData, I think you mean the limitations of WCF Data Services. OData is the protocol; the implementation of what's supported or not in conjunction with the syntax and operation keywords of the OData protocol is up to the OData provider (which is WCF Data Services in your case, I believe since you tagged the question as WCF).

    Given that, the subset of LINQ features are spelled out in this MSDN article. The number of limitations is pretty substantive, so it's probably better to just link to it instead of listing them out.

    For your first question about recursive queries, I have to admit I'm not sure of how a typical LINQ recursive function would look like, unless you define your own extension method. If you're doing something like that, your best bet may be to wrap that recursive call in a WCF Data Service custom service method and invoke it via the URL as you would any other service method.

    I hope this helps!