// PUT: api/DocumentDB/5 public void Put(string collection, string id, string document) { dynamic value = System.Web.Helpers.Json.Decode(document); value.id = id; DocumentDBHelper.UpsertDocumentAsync(collection, value); }
// POST: api/DocumentDB/collection public void PostList(string collection, [FromBody] IEnumerable <dynamic> entites) { //dynamic value = System.Web.Helpers.Json.Decode(document); foreach (var d in entites) { DocumentDBHelper.UpsertDocumentAsync(collection, d); } }