Open
Description
Unable to return a nested entity property as part of a Created(201) response.
Assemblies affected
Microsoft.AspNetCore 2.1.6
Microsoft.AspNetCore.Mvc 2.1.3
Microsoft.AspNetCore.OData 7.1.0
Reproduce steps
- Create a blank web API project and import OData packages
- Add two entity types, A and B, and a complex type C
- Add properties reference B and C inside A
- Add a CRUD controller for A
- Send a POST request for A and return the created object using the built-in Created() method
- The returned JSON is populated for the complex type C but the entity type B property is not returned
Expected result
The returned JSON is populated for both the complex type C and the entity type B properties
Actual result
The returned JSON is populated for the complex type C but the entity type B property is not returned
Additional detail
I tried playing with the expand option (fluent syntax, property decorator, automatic expansion) but that doesn't affect the response