コード例 #1
0
        // 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);
        }
コード例 #2
0
        // 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);
            }
        }