Quantcast
Channel: Web API
Viewing all articles
Browse latest Browse all 4850

odata $batch question

$
0
0

1a. Will a $batch insert which includes a parent and child record be smart enough to know to insert the parent first into the database, otherwise throwing a foreign key exception?

1b. If the above isn't supported, is it possible to created a static route, which accepts an array of customers which would include their children at which point you could do your own processing. The method input could look like  

void InsertCustomer_CustOrderTransaction( Customer[]  includedcustomers)

Customer would have a property that includes a list of it's children.

2. Does web api odata return the updated records to the client on submission after a batch insert? If not, can you simply change the return type on a static route to include the newly inserted records? For example,

Customers[] InsertCustomer_CustOrderTransaction( Customer[]  includedcustomers) //from void


Viewing all articles
Browse latest Browse all 4850

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>