Quantcast
Channel: ASPNETWebStack Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 7215

Closed Issue: Odata actions not working when returning PageResult [772]

$
0
0
Request:

POST http://localhost:50000/StubEntity/Paged HTTP/1.1
Accept: application/json; odata=fullmetadata
Host: localhost:50000
Content-Length: 0
Connection: Keep-Alive

Exception:
System.Runtime.Serialization.SerializationException occurred
HResult=-2146233076
Message=The related entity set could not be found from the OData path. The related entity set is required to serialize the payload.
Source=System.Web.Http.OData
StackTrace:
at System.Web.Http.OData.Formatter.Serialization.ODataFeedSerializer.WriteObject(Object graph, ODataMessageWriter messageWriter, ODataSerializerContext writeContext) in c:\work\aspnetwebstack\src\System.Web.Http.OData\OData\Formatter\Serialization\ODataFeedSerializer.cs:line 55
InnerException:

Metadata document:
<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="1.0" xmlns:edmx="http://schemas.microsoft.com/ado/2007/06/edmx">
<edmx:DataServices m:DataServiceVersion="3.0" m:MaxDataServiceVersion="3.0" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<Schema Namespace="ODataActionsRepro.Models" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityType Name="StubEntity">
<Key>
<PropertyRef Name="Id" />
</Key>
<Property Name="Id" Type="Edm.Int32" Nullable="false" />
</EntityType>
</Schema>
<Schema Namespace="Default" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
<EntityContainer Name="Container" m:IsDefaultEntityContainer="true">
<EntitySet Name="StubEntity" EntityType="ODataActionsRepro.Models.StubEntity" />
<FunctionImport Name="Paged" IsBindable="true" m:IsAlwaysBindable="true">
<Parameter Name="bindingParameter" Type="Collection(ODataActionsRepro.Models.StubEntity)" Nullable="false" />
</FunctionImport>
</EntityContainer>
</Schema>
</edmx:DataServices>
</edmx:Edmx>

Repro steps:

1. Restore nugget packages
2. Point ODataActionsRepro to your local copy of System.Web.Http.OData.dll
3. Run
Comments: Not a bug

Viewing all articles
Browse latest Browse all 7215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>