示例#1
0
        public void BulkInsertDocuments(string tenantId, IEnumerable <object> documents,
                                        BulkInsertMode mode = BulkInsertMode.InsertsOnly,
                                        int batchSize       = 1000)
        {
            var bulkInsertion = new BulkInsertion(Tenancy.GetTenant(tenantId), Options);

            bulkInsertion.BulkInsertDocuments(documents, mode, batchSize);
        }
示例#2
0
        public Task BulkInsertDocumentsAsync(string tenantId, IEnumerable <object> documents,
                                             BulkInsertMode mode = BulkInsertMode.InsertsOnly,
                                             int batchSize       = 1000, CancellationToken cancellation = default)
        {
            var bulkInsertion = new BulkInsertion(Tenancy.GetTenant(tenantId), Options);

            return(bulkInsertion.BulkInsertDocumentsAsync(documents, mode, batchSize, cancellation));
        }
示例#3
0
        public void BulkInsert <T>(string tenantId, IReadOnlyCollection <T> documents,
                                   BulkInsertMode mode = BulkInsertMode.InsertsOnly,
                                   int batchSize       = 1000)
        {
            var bulkInsertion = new BulkInsertion(Tenancy.GetTenant(tenantId), Options);

            bulkInsertion.BulkInsert(documents, mode, batchSize);
        }
示例#4
0
        public Task BulkInsertAsync <T>(string tenantId, IReadOnlyCollection <T> documents,
                                        BulkInsertMode mode            = BulkInsertMode.InsertsOnly, int batchSize = 1000,
                                        CancellationToken cancellation = default)
        {
            var bulkInsertion = new BulkInsertion(Tenancy.GetTenant(tenantId), Options);

            return(bulkInsertion.BulkInsertAsync(documents, mode, batchSize, cancellation));
        }