asp.net web api - How to return a different object from the one you run a query on in OData? -


i'm trying return object controller's get method of different class class query run on.

based on answer here, i'm doing:

public pageresult<outputpoco> get(odataqueryoptions<inputpoco> odataqueryoptions) 

when trying run 406 not acceptable. missing? there working example out there of approach?

update: using odatacontroller. outputpoco contains reference inputpoco. need sorting , filtering work (on inputpoco).

are using odatacontroller? have use odatacontroller when building odata service. in case have build edm model , expose odata service using odata route.

if want build vanilla web api supports odata query semantics (and not rest of odata url conventions , formatting), should use apicontroller instead.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -