如何跳过、选择、置顶 $expand
在 OData 中?为什么以下不起作用?
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($select=Emails&$top=1&$skip1)
但如果我只使用
$select
或 $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)
最佳答案
在扩展中,您需要使用分号而不是与号来分隔不同的选项。这个 URL 应该有效:
http://services.odata.org/V4/(S(s2sx534tmya3oqnyfxumtyl1))/TripPinServiceRW/People?$expand=Friends($select=Emails;$top=1;$skip=1)
关于asp.net-web-api - 如何在 OData 中的 $expand 上跳过、选择、顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38463286/