Entity Framework Extensions BatchTimeout
Batch timeout is the number of seconds for the operation to complete before it times out.
BatchTimeout gets or sets the maximum of time in seconds to wait for a batch before the command throws a timeout exception. The following example modifies the timeout to 180 seconds when bulk saving data.
context.BulkSaveChanges(options => options.BatchTimeout = 180);
You can also set batch size globally using
// Global EntityFrameworkManager.BulkOperationBuilder = builder => builder.BatchTimeout = 180;
Having access to change the
BatchTimeout gives you the flexibility required when some operations are too slow to complete due to several reasons such as:
- Batch Size
- Column Size