0
나는이 쿼리를 요청하기 위해 노력하고있어 :중 하나로, OData : 여행 쿼리 오류 캐스팅 복합 유형
http://services.odata.org/V4/TripPinService/People('russellwhyte')/AddressInfo/Microsoft.OData.SampleService.Models.TripPin.AirportLocation
그래서, 내가 People('russellwhyte')
의 모든 AirportLocation
를 얻기 위해 노력하고있어. 그러나, 나는이 오류 메시지를 받고 있어요 :
<ComplexType Name="Location" OpenType="true">
<Property Name="Address" Type="Edm.String" Nullable="false" />
<Property Name="City" Type="Microsoft.OData.SampleService.Models.TripPin.City" Nullable="false" />
</ComplexType>
<ComplexType Name="EventLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
<Property Name="BuildingInfo" Type="Edm.String" />
</ComplexType>
<ComplexType Name="AirportLocation" BaseType="Microsoft.OData.SampleService.Models.TripPin.Location" OpenType="true">
<Property Name="Loc" Type="Edm.GeographyPoint" Nullable="false" SRID="4326" />
</ComplexType>
그래서 Location
복합 형이 AirportLocation
및 EventLocation
의 기본 유형 :
"error": {
"code": "InternalServerError",
"message": "Type cast segment 'Microsoft.OData.SampleService.Models.TripPin.AirportLocation' after a collection which is not of entity type is not allowed.",
"innererror": {...
}
이것은 Location
복합 형 관련 스키마입니다.
어떤 아이디어가 있습니까?
에
GetLocationsOfCnAddress
또는GetLocationsOfUsAddress
이름이 있어야 당신이 나를 어떤을 제공 할 수있는 유형Locations
을 임명했다 왜'GetLocationsOfCnAddress'와'GetLocationsOfUsAddress'를 가져야하는지 설명하는 문서를 제공하고 있습니까? 다른 한편, 어떤 서비스가 실제로 그러한 기능을 지원하는지 알고 있습니까? – Jordi대회 경로에 관한 문서는 http://odata.github.io/WebApi/#03-02-built-in-routing-conventions에서 찾을 수 있습니다. 그러나 그것은 재산 던지기를 언급하지 않는다. 아마 코드를 참조 할 수 있습니다. https://github.com/OData/WebApi/blob/master/src/System.Web.OData/OData/Routing/Conventions/PropertyRoutingConvention.cs#L65-L67 –