Open AlpineJBoehnen opened 5 months ago
@AlpineJBoehnen this blog post demonstrates how to use bulk ops on the server with Microsoft.AspNetCore.OData https://devblogs.microsoft.com/odata/bulk-operations-support-in-odata-web-api/, the blog post is based on the 7.x version, but it should work for 8 as well (@ElizabethOkerio correct me if I'm wrong)
Assemblies affected
Microsoft.AspNetCore.OData 8.2.5
Microsoft.OData.Client 7.21.3
Describe the bug Related issue: https://github.com/OData/odata.net/issues/3004
My primary question is: does Microsoft.AspNetCore.OData support the OData 4.01 spec, specifically bulk update operations?
When the client sends a bulk update request with the OData-Version header set to 4.01 the library throws the exception
An OData version of 4.01 was specified and the maximum supported OData version is 4.0.
, then continues to the controller action with theDeltaSet<T>
parameter as null. If I send an identical request from postman with the header set to 4.0 instead, the library seemingly has no issue and populates theDeltaSet<T>
as expected (for a simple model without related entities or links).Reproduce steps I implemented Sample Request 1 from the OData Client Bulk Update Operations examples on my client. And implemented an endpoint on my server to "patch a collection of entities" from this Microsoft.AspNetCore.OData tutorial.
Note: I modified the client example to work with the Shape model from the server example.
Client code:
Server code:
Data Model
EDM (CSDL) Model
Request/Response
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Exception: