本文介绍了RIA Services OData“不允许查询选项".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我有一个由RIA自动创建的OData端点,该端点似乎可以与简单的获取"查询一起使用.

I have a OData endpoint which was created automatically by RIA which seems to work with simple 'get' queries.

例如

http://xxx/Service/BusinessApplication1-Web-DomainService1.svc/odata/ProductSet

但是当我尝试使用"where"或"top"之类的查询时,例如:

But when I try to use queries such as 'where' or 'top', e.g:

.../BusinessApplication1-Web-DomainService1.svc/odata/ProductSet?$ top = 50

.../BusinessApplication1-Web-DomainService1.svc/odata/ProductSet?$top=50

不允许使用查询选项"的结果.

results in 'Query options are not allowed.'

我设置了一个WCF数据服务,该服务具有一个OData终结点,该终结点可以正常工作并允许查询,那么为什么RIA生成的终结点不起作用?

I set up a WCF Data Service that has a OData endpoint which works fine and allows queries, so why does the RIA generated one not work?

谢谢!

推荐答案

RIA服务公开的OData端点当前不支持查询运算符.据我所知,也没有真正的解决方法.

The OData endpoint exposed by a RIA service doesn't currently support query operators. There's no real workaround for that either (as far as I know).

这篇关于RIA Services OData“不允许查询选项".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 09:16