Select distinct values with odata

匿名 (未验证) 提交于 2019-12-03 08:33:39

问题:

I'm trying to create a call to odata webservice that would select only distinct values of some property. Is there any good example of how to do this?

回答1:

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 which usually has that ability. And then the client can call that service operation instead.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!