コード例 #1
0
        private void SetupSampleDocument(DocumentsApi documentsApi)
        {
            var doc = new Document("7", "contact");

            doc.Fields.Add("age", "26");
            doc.Fields.Add("name", "Vladimir");

            documentsApi.CreateDocument(doc, "contact");
        }
コード例 #2
0
        public void DoWork()
        {
            var documentsApi = new DocumentsApi("http://localhost:9800");

            foreach (var doc in GetSampleDocuments(10, "contact"))
            {
                var response = documentsApi.CreateDocument(doc, doc.Id);

                Debug.Assert(response.Error?.Message == null);
                var createdDocumentId = response.Data.Id; // Should be between 1 and 10
            }
        }