Table of Contents

Class BatchDelete

Namespace
Z.EntityFramework.Extensions
Assembly
Z.EntityFramework.Extensions.dll

Class to batch delete.

public class BatchDelete
Inheritance
BatchDelete
Inherited Members

Constructors

BatchDelete()

Default constructor.

public BatchDelete()

Fields

CommandExecuteAction

public Func<DbCommand, DbCommandInterceptionContext, int> CommandExecuteAction

Field Value

Func<DbCommand, DbCommandInterceptionContext, int>

Properties

BatchDelayInterval

Gets or sets the batch delay interval in milliseconds (The wait time between batch).

public int BatchDelayInterval { get; set; }

Property Value

int

The batch delay interval in milliseconds (The wait time between batch).

BatchSize

Gets or sets the size of the batch.

public int BatchSize { get; set; }

Property Value

int

The size of the batch.

Executing

Gets or sets the DbCommand before being executed.

public Action<DbCommand> Executing { get; set; }

Property Value

Action<DbCommand>

The DbCommand before being executed.

UseTableLock

Gets or sets a value indicating whether the query use table lock.

public bool UseTableLock { get; set; }

Property Value

bool

True if use table lock, false if not.

Methods

EscapeName(string, bool, bool, bool)

public string EscapeName(string name, bool isMySql, bool isOracle, bool isHana)

Parameters

name string
isMySql bool
isOracle bool
isHana bool

Returns

string

Execute<T>(IQueryable<T>)

Executes the batch delete operation.

public int Execute<T>(IQueryable<T> query) where T : class

Parameters

query IQueryable<T>

The query used to execute the batch operation.

Returns

int

The number of rows affected.

Type Parameters

T

The type of elements of the query.