CosmosDbContextOptionsBuilder.BulkExecutionAllowed(Boolean) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the boolean to enable the Cosmos DB SDK bulk execution feature. Enabling this feature can improve throughput for small write operations but may increase latency. It is recommended only for high-throughput, non-latency-sensitive scenarios. Because Transactional Batches cannot be executed in bulk mode, any operations batched by EF will not use bulk execution. To ensure operations are executed in bulk, consider disabling batching by setting Never. For more information, see Saving Data - Azure Cosmos DB Provider.
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder BulkExecutionAllowed(bool enabled = true);
abstract member BulkExecutionAllowed : bool -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.BulkExecutionAllowed : bool -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Public Overridable Function BulkExecutionAllowed (Optional enabled As Boolean = true) As CosmosDbContextOptionsBuilder
Parameters
- enabled
- Boolean
true to enable the Cosmos DB SDK bulk feature.
Returns
Remarks
See Using DbContextOptions, and Accessing Azure Cosmos DB with EF Core for more information and examples.