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
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
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
Returns
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.