更新时间:2023-02-16 12:12:46
$apply=filter(Status eq 1)/aggregate(price with average as averagePrice)
也许你可以参考现有的测试:
maybe you can refer the existing test:
https://github.com/OData/WebApi/blob/master/OData/test/E2ETest/WebStack.QA.Test.OData/Aggregation/AggregationTests.cs
https://github.com/OData/WebApi/blob/master/OData/test/UnitTest/System.Web.OData.Test/OData/Query/ApplyQueryOptionTest.cs
使用 $apply 在 OData v4 规范中聚合过滤数据集的语法