use*_*286 4 odata asp.net-web-api
如何$expand在 OData 中跳过、选择、顶部?为什么以下不起作用?
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($select=Emails&$top=1&$skip1)
Run Code Online (Sandbox Code Playgroud)
但是,如果我只使用$selector$top或$skip在扩展中使用它。例如,以下工作。为什么上述不起作用?我认为这是 Odata 限制。
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($select=Emails)
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($top=1)
Run Code Online (Sandbox Code Playgroud)
在扩展中,您需要使用分号而不是与号来分隔不同的选项。这个 URL 应该有效:
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($select=Emails;$top=1;$skip=1)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2428 次 |
| 最近记录: |