【发布时间】:2015-09-01 07:58:59
【问题描述】:
我正在使用带有 OData V4 的 WebAPI 2.2。
我可以使用$filter=RelatedObj/PropertyName eq 'Some Value' 根据相关对象属性值过滤实体列表。
但是,当我尝试使用与 $select 相同的语法时:
$select=Id,Name,RelatedObj/PropertyName
导致异常:
"message": "The query specified in the URI is not valid. Found a path with multiple navigation properties or a bad complex property path in a select clause. Please reword your query such that each level of select or expand only contains either TypeSegments or Properties.",
"innererror": {
"message": "Found a path with multiple navigation properties or a bad complex property path in a select clause. Please reword your query such that each level of select or expand only contains either TypeSegments or Properties.",
"type": "Microsoft.OData.Core.ODataException",
这可以解决吗?
【问题讨论】:
标签: .net asp.net-web-api odata asp.net-web-api-odata