asp.net web api - Using a list of objects as a parameter for an odata Action -
attempting setup action in odata webapi controller, accepts list of objects.
however, when try:
updatesortorder.parameter<list<updateitem>>("sortorder");
and pass in
{"sortorder": [{"itemproperty":"test"}]}
my odataactionparameters null.
it works if change parameters accept single updateitem rather list, , use:
{"sortorder": {"itemproperty":"test"}}
or if create wrapper class contains list of updateitems, have been unable set parameter list.
use,
updatesortorder.collectionparameter<updateitem>("sortorder");
instead.
Comments
Post a Comment