【发布时间】:2015-02-24 13:22:10
【问题描述】:
我有一个 Web 服务 API(带有一个称为 piperuns 的 OData 端点,使用 ODataController),它接受一个可选的查询字符串(称为 projectNumber),例如:
http://localhost:59636/piperuns?projectNumber=1
我有一个基于 Simple.OData.Client 的客户端,但我无法弄清楚如何传递这个可选的查询字符串...我使用的是动态语法,并且可以使用该语法获取管道运行(不带查询参数)下面:
ODataFeedAnnotations annotations = new ODataFeedAnnotations();
ODataClient client = new ODataClient("http://localhost:59636/");
var x = ODataDynamic.Expression;
IEnumerable<dynamic> pipeRunsNext = await(Task<IEnumerable<Simple.OData.Client.ODataEntry>>)client
.For(x.piperuns)
.FindEntriesAsync(annotations.NextPageLink, annotations);
但我没有找到任何关于如何包含可选查询字符串参数的信息(如果需要)?
谢谢!
【问题讨论】:
标签: odata simple.odata