Collection Exists Criteria in WCF Data Services

后端 未结 3 1075
自闭症患者
自闭症患者 2020-12-18 05:57

I\'m trying to ask my OData service:

\"Give me all the Products that do not have a Category\"

with the Products and Category have a m2m relationship.

<
3条回答
  •  一整个雨季
    2020-12-18 06:22

    This is not supported:

    http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/thread/b505d630-c808-4bde-b08e-3ce1dd17f621/

    The OData URL query language currently doesn't support this type of query. As a result the client's LINQ processor doesn't support it either. If you think it's valuable to add such functionality please use our connect site to suggest the feature, it makes our planning job easier next time around. https://connect.microsoft.com/dataplatform/content/content.aspx?ContentID=15540&wa=wsignin1.0

    As a workaround you could probably use service operation. Define a service operation which returns IQueryable (so that you can compose some more query operators on the result from the client) and use the server side provider to issues the query above.

提交回复
热议问题