I am trying to adapt a DynamicEdmModelCreation sample from https://github.com/OData/ODataSamples/tree/master/WebApi/v4/DynamicEdmModelCreation into a working version of v3 (I want to load odata directly into excel, which does not yet support odata v4)
I added config.AddODataQueryFilter() to the setting and [EnableQuery] in the controller's getler method, but now I get an exception:
config.AddODataQueryFilter()
[EnableQuery]
In System.Web.Http.OData.dllThe first random error like "System.Runtime.Serialization.SerializationException" occurredAdditional Information: "EnumerableQuery`1" cannot be serialized using ODataMediaTypeFormatter.
In System.Web.Http.OData.dll
Additional Information: "EnumerableQuery`1" cannot be serialized using ODataMediaTypeFormatter.
which is thrown from https://github.com/ASP-NET-MVC/aspnetwebstack/blob/master/OData/src/System.Web.Http.OData/OData/Formatter/ODataMediaTypeFormatter.cs#L577
Is the fact that my Getler method returns an EdmEntityObjectCollection problem? I would think that just adding the EnableQuery attribute would be enough for the structure to know how to apply this query operation to the EdmEntityObjectCollection returned to me (which will have much more data than may be necessary)
EdmEntityObjectCollection
What you did right, but OData WebApi now does not support query parameters in a non-printable script, and there is an open issue about this function.
Source: https://habr.com/ru/post/1216312/More articles:Code with generics will not compile - javaWhat prevents endless contours between related Winforms elements? - c #How can I repeat a block N times in a Meteor Spacebars pattern? - meteorHow to integrate React Native into an existing iOS project - reactjsCaching and AOP in Mendix: Is there a unified or standardized approach for server-side caching in the Mendix application? - cachingJUCE and React Native - linker error "ld: library not found for -lReact" - iosGetting the wrong colors after image manipulation - c #HTML header balancing with CSS / jQuery - jqueryHow to test CSV file loading in Capybara and RSpec? - ruby โโ| fooobar.comHow to program a Bluetooth LE device using C on Linux x86? - cAll Articles