Class BulkOperation<TEntity>
- Namespace
- Z.BulkOperations
- Assembly
- Z.EntityFramework.Extensions.dll
public class BulkOperation<TEntity> : BulkOperation, IDisposable where TEntity : class
Type Parameters
TEntity
- Inheritance
-
BulkOperation<TEntity>
- Implements
- Derived
- Inherited Members
Constructors
BulkOperation()
public BulkOperation()
BulkOperation(DbConnection)
public BulkOperation(DbConnection connection)
Parameters
connection
DbConnection
Fields
_internalColumnMapping
public List<ColumnMapping<TEntity>> _internalColumnMapping
Field Value
- List<ColumnMapping<TEntity>>
Properties
AutoMapIdentityExpression
Gets or sets the automatic map identity expression.
public Expression<Func<TEntity, object>> AutoMapIdentityExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The automatic map identity expression.
AutoMapKeyExpression
Gets or sets the automatic map key expression.
public Expression<Func<TEntity, object>> AutoMapKeyExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The automatic map key expression.
CoalesceDestinationOnMergeUpdateExpression
Gets or sets columns to coalesce, ISNULL(DestinationValue, StagingValue).
public Expression<Func<TEntity, object>> CoalesceDestinationOnMergeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(DestinationValue, StagingValue).
CoalesceDestinationOnSynchronizeUpdateExpression
Gets or sets columns to coalesce, ISNULL(DestinationValue, StagingValue).
public Expression<Func<TEntity, object>> CoalesceDestinationOnSynchronizeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(DestinationValue, StagingValue).
CoalesceDestinationOnUpdateExpression
Gets or sets columns to coalesce, ISNULL(DestinationValue, StagingValue).
public Expression<Func<TEntity, object>> CoalesceDestinationOnUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(DestinationValue, StagingValue).
CoalesceOnMergeUpdateExpression
Gets or sets columns to coalesce, ISNULL(StagingValue, DestinationValue).
public Expression<Func<TEntity, object>> CoalesceOnMergeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(StagingValue, DestinationValue).
CoalesceOnSynchronizeUpdateExpression
Gets or sets columns to coalesce, ISNULL(StagingValue, DestinationValue).
public Expression<Func<TEntity, object>> CoalesceOnSynchronizeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(StagingValue, DestinationValue).
CoalesceOnUpdateExpression
Gets or sets columns to coalesce, ISNULL(StagingValue, DestinationValue).
public Expression<Func<TEntity, object>> CoalesceOnUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to coalesce, ISNULL(StagingValue, DestinationValue).
ColumnInputExpression
Gets or sets the column input expression.
public Expression<Func<TEntity, object>> ColumnInputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The column input expression.
ColumnInputOutputExpression
Gets or sets the column input/output expression.
public Expression<Func<TEntity, object>> ColumnInputOutputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The column input/output expression.
ColumnMappings
Gets or sets the column mappings.
public List<ColumnMapping<TEntity>> ColumnMappings { get; set; }
Property Value
- List<ColumnMapping<TEntity>>
The column mappings.
ColumnOutputExpression
Gets or sets the column output expression.
public Expression<Func<TEntity, object>> ColumnOutputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The column output expression.
ColumnPrimaryKeyExpression
Gets or sets the column primary key expression.
public Expression<Func<TEntity, object>> ColumnPrimaryKeyExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The column primary key expression.
ColumnStagingTableFormulaExpression
Gets or sets columns that should be added to be used in formula.
public Expression<Func<TEntity, object>> ColumnStagingTableFormulaExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns that should be added to be used in formula.
ColumnSynchronizeDeleteKeySubsetExpression
Gets or sets the column primary key expression.
public Expression<Func<TEntity, object>> ColumnSynchronizeDeleteKeySubsetExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The column primary key expression.
DeleteMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when update is matched.
public Expression<Func<TEntity, object>> DeleteMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when update is matched.
DeleteMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when update is matched.
public Expression<Func<TEntity, object>> DeleteMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when update is matched.
IgnoreColumnOutputExpression
Gets or sets columns output to ignore using an expression.
public Expression<Func<TEntity, object>> IgnoreColumnOutputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns output to ignore using an expression.
IgnoreOnDeleteMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when delete is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnDeleteMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when delete is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnDeleteMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when delete is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnDeleteMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when delete is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnInsertExpression
Gets or sets the ignore on insert expression.
public Expression<Func<TEntity, object>> IgnoreOnInsertExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on insert expression.
IgnoreOnMergeInsertExpression
Gets or sets the ignore on merge insert expression.
public Expression<Func<TEntity, object>> IgnoreOnMergeInsertExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on merge insert expression.
IgnoreOnMergeMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnMergeMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnMergeMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnMergeMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnMergeUpdateExpression
Gets or sets the ignore on merge update expression.
public Expression<Func<TEntity, object>> IgnoreOnMergeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on merge update expression.
IgnoreOnSynchronizeInsertExpression
Gets or sets the ignore on synchronize insert expression.
public Expression<Func<TEntity, object>> IgnoreOnSynchronizeInsertExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on synchronize insert expression.
IgnoreOnSynchronizeMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnSynchronizeMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnSynchronizeMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnSynchronizeMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when merge update is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnSynchronizeUpdateExpression
Gets or sets the ignore on synchronize update expression.
public Expression<Func<TEntity, object>> IgnoreOnSynchronizeUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on synchronize update expression.
IgnoreOnUpdateExpression
Gets or sets the ignore on update expression.
public Expression<Func<TEntity, object>> IgnoreOnUpdateExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The ignore on update expression.
IgnoreOnUpdateMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnUpdateMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when update is matched. All columns are part of the condition except those from the ignore expression.
IgnoreOnUpdateMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when update is matched. All columns are part of the condition except those from the ignore expression.
public Expression<Func<TEntity, object>> IgnoreOnUpdateMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when update is matched. All columns are part of the condition except those from the ignore expression.
MergeMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when merge update is matched.
public Expression<Func<TEntity, object>> MergeMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when merge update is matched.
MergeMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when merge update is matched.
public Expression<Func<TEntity, object>> MergeMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when merge update is matched.
OnMergeInsertInputExpression
Gets or sets columns to input during the Merge Insert statement.
public Expression<Func<TEntity, object>> OnMergeInsertInputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to input during the Merge Insert statement.
OnMergeUpdateInputExpression
Gets or sets columns to input during the Merge Update statement.
public Expression<Func<TEntity, object>> OnMergeUpdateInputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to input during the Merge Update statement.
OnSynchronizeInsertInputExpression
Gets or sets columns to input during the Synchronize Insert statement.
public Expression<Func<TEntity, object>> OnSynchronizeInsertInputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to input during the Synchronize Insert statement.
OnSynchronizeUpdateInputExpression
Gets or sets columns to input during the Synchronize Update statement.
public Expression<Func<TEntity, object>> OnSynchronizeUpdateInputExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The columns to input during the Synchronize Update statement.
PostConfiguration
Gets or sets an action that will be execute once basic options on the BulkOperations has been added such as DestinationTableName, ColumnMapping.
public Action<BulkOperation<TEntity>> PostConfiguration { get; set; }
Property Value
- Action<BulkOperation<TEntity>>
SynchronizeMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when merge update is matched.
public Expression<Func<TEntity, object>> SynchronizeMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when merge update is matched.
SynchronizeMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when merge update is matched.
public Expression<Func<TEntity, object>> SynchronizeMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when merge update is matched.
UpdateMatchedAndConditionExpression
Gets or sets the AND CONDITION
to add when update is matched.
public Expression<Func<TEntity, object>> UpdateMatchedAndConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND CONDITION
to add when update is matched.
UpdateMatchedAndOneNotConditionExpression
Gets or sets the AND (ONE NOT MEET CONDITION)
to add when update is matched.
public Expression<Func<TEntity, object>> UpdateMatchedAndOneNotConditionExpression { get; set; }
Property Value
- Expression<Func<TEntity, object>>
The
AND (ONE NOT MEET CONDITION)
to add when update is matched.
Methods
BulkDelete(List<TEntity>)
Bulk delete.
public virtual void BulkDelete(List<TEntity> datasource)
Parameters
datasource
List<TEntity>The datasource.
BulkDeleteAsync(List<TEntity>, CancellationToken)
Bulk delete.
public virtual Task BulkDeleteAsync(List<TEntity> datasource, CancellationToken cancellationToken = default)
Parameters
datasource
List<TEntity>The datasource.
cancellationToken
CancellationTokenThe cancellation token.
Returns
BulkInsert(List<TEntity>)
Bulk insert.
public virtual void BulkInsert(List<TEntity> datasource)
Parameters
datasource
List<TEntity>The datasource.
BulkInsertAsync(List<TEntity>, CancellationToken)
Bulk insert.
public virtual Task BulkInsertAsync(List<TEntity> datasource, CancellationToken cancellationToken = default)
Parameters
datasource
List<TEntity>The datasource.
cancellationToken
CancellationTokenThe cancellation token.
Returns
BulkMerge(List<TEntity>)
Bulk merge.
public virtual void BulkMerge(List<TEntity> datasource)
Parameters
datasource
List<TEntity>The datasource.
BulkMergeAsync(List<TEntity>, CancellationToken)
Bulk merge.
public virtual Task BulkMergeAsync(List<TEntity> datasource, CancellationToken cancellationToken = default)
Parameters
datasource
List<TEntity>The datasource.
cancellationToken
CancellationTokenThe cancellation token.
Returns
BulkSynchronize(List<TEntity>)
Bulk synchronize.
public virtual void BulkSynchronize(List<TEntity> datasource)
Parameters
datasource
List<TEntity>The datasource.
BulkSynchronizeAsync(List<TEntity>, CancellationToken)
Bulk synchronize.
public virtual Task BulkSynchronizeAsync(List<TEntity> datasource, CancellationToken cancellationToken = default)
Parameters
datasource
List<TEntity>The datasource.
cancellationToken
CancellationTokenThe cancellation token.
Returns
BulkUpdate(List<TEntity>)
Bulk update.
public virtual void BulkUpdate(List<TEntity> datasource)
Parameters
datasource
List<TEntity>The datasource.
BulkUpdateAsync(List<TEntity>, CancellationToken)
Bulk update.
public virtual Task BulkUpdateAsync(List<TEntity> datasource, CancellationToken cancellationToken = default)
Parameters
datasource
List<TEntity>The datasource.
cancellationToken
CancellationTokenThe cancellation token.