Dapper Plus – Introduction

Library Under Construction (Available at the end of April)

Dapper Plus Mapper allow configuring batch options.

Name Description
BatchDelayInterval Sets the delay interval to wait between every batch (in milliseconds)
BatchSize Sets the size of the batch.
BatchTimeout Sets the batch timeout (in seconds).

Dapper Batch Delay Interval

Sets the delay interval to wait between every batch (in milliseconds)

Example

Configure order to wait for 1 second (1000 milliseconds) between every batch.

Default

DapperPlusManager.MapperFactory = mapper => mapper.BatchDelayInterval(1000);

Instance

DapperPlusManager.Entity().BatchDelayInterval(1000);

Dapper Batch Size

Sets the size of the batch.

Example

Configure the entity order to save entities in a batch of 500 records.

Default

DapperPlusManager.MapperFactory = mapper => mapper.BatchSize(500);

Instance

DapperPlusManager.Entity().BatchSize(500);

Dapper Batch Timeout

Sets the batch timeout (in seconds).

Example

Configure the entity order to timeout after 3 minutes (180 seconds)

Default

DapperPlusManager.MapperFactory = mapper => mapper.BatchTimeout(180);

Instance

DapperPlusManager.Entity().BatchTimeout(180);