Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public async Task CreateMultipleAsync(IEnumerable<JObject> models)
- {
- var collectionLink = UriFactory.CreateDocumentCollectionUri(_databaseName, _collectionName);
- var collection = await _client.ReadDocumentCollectionAsync(collectionLink);
- var bulkExecutor = new BulkExecutor(_client, collection);
- try
- {
- await bulkExecutor.InitializeAsync();
- var response = await bulkExecutor.BulkImportAsync(models, true);
- } catch (Exception ex)
- {
- }
- }
Add Comment
Please, Sign In to add comment