Answer by Carl Heinrich Hancke for Deserialize Web Api OData response
If you need access to the @odata.xxx fields in the response JSON (such as implementing a loop for paged results), the following is my implementation which expands on the solution from andygjp.I'm using...
View ArticleAnswer by andygjp for Deserialize Web Api OData response
Try deserialize the content like this:var content = response.Content.ReadAsAsync<ODataResponse<Person>>();Where ODataResponse is:internal class ODataResponse<T>{ public T[] Value {...
View ArticleDeserialize Web Api OData response
I have an Entity Framework object returned by OData V4 controller.I return an IQueryable and if I call the OData endpoint without any OData clause I can succesfully do this:var content =...
View Article