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

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -