Using a list of objects as a parameter for an odata Action
Attempting to setup an action in my odata WebAPI controller, that accepts
a List of objects.
however, when I try:
updateSortOrder.Parameter<List<UpdateItem>>("SortOrder");
and pass in
{"SortOrder": [{"ItemProperty":"test"}]}
my ODataActionParameters is null.
It works if I change the parameters to accept a single UpdateItem rather
than a list, and use:
{"SortOrder": {"ItemProperty":"test"}}
or if I create a wrapper class that contains a list of UpdateItems, but I
have been unable to set the parameter itself to a list.
No comments:
Post a Comment