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
Post a Comment