Ich bin Newbee für OData V4. Ich hatte CRUD Operation einfach mit Web-API mit oData V4 zu implementieren.Benötigen Sie ein Beispiel für Odata V4 Batch mit Web-API mit JSON
Aber ich verstehe nicht, wie kann ich Batch-Anfrage mit JSON durchführen. Ich besuchte auch unten links:
http://www.odata.org/documentation/odata-version-3-0/batch-processing/ http://www.odata.org/documentation/odata-version-3-0/batch-processing/
Aber nicht Idee der Durchführung Batch-Betrieb JSON verwenden konnte.
Unten ist Codebeispiel für mehrere Get.
$.ajax({
url: 'http://localhost:52603/odata/$batch',
contentType: 'multipart/mixed; boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b',
data: {
__batchRequests: [
{ requestUri: "Employee", method: "GET" },
{ requestUri: "Country", method: "GET" }
]
},
success: function (data) {
alert(data);
console.log(data);
}
});
Jede Art von Hilfe wäre zu schätzen.