asp.net web api - rest api that allows update to collection -


what best practice allowing webapi odata based webservice update entire collection?

for example, have admin page allows users maintain list of payment terms. have created controller based on paymentterm entity, allows standard get, key, put, post, , delete, working single instances of paymentterm entity. however, our ui team retrieve collection of payment terms (easily done standard collection), manipulate locally, , put or post entire collection server, rather having make series of put, post, , delete calls server.

i have tried creating action method this, , while have managed work, seems kludgy, requires id, odata parameters (which contain collection), , id meaningless because @ point not working instance of payment term, entire collection of them.

i create new controller solely working collection of payment terms, i'm not sure better, end having have base class declaration of

entitysetcontroller<paymenttermcollection, int> 

or like, not make sense collection not have key had meaning.

you should consider support $batch ( standard part of odata ) in web api using entitysetapicontrollers can submit bag of changes including post-put-delete of multiple entities sever easily, within support of jaydata , breeze , ... luck


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -