Table of Contents

Interface IBulkInfoProvider<TInfo>

Namespace
CMS.DataEngine
Assembly
CMS.DataEngine.dll

Interface describing info object provider with bulk operations.

public interface IBulkInfoProvider<TInfo> where TInfo : AbstractInfoBase<TInfo>, new()

Type Parameters

TInfo

Type of info object managed by the bulk operations.

Extension Methods

Methods

BulkDelete(IWhereCondition, BulkDeleteSettings)

Bulk deletes info objects based on the given condition.

void BulkDelete(IWhereCondition where, BulkDeleteSettings settings = null)

Parameters

where IWhereCondition

Where condition filtering the objects to be deleted, or null.

settings BulkDeleteSettings

Configuration for the bulk delete. If null, default configuration is used.

Remarks

Note that the delete process of individual object types within dependencies does not run within transaction. If it fails, some data may be cleared and not rolled back. If you require transaction, wrap the call of this method to CMSTransactionScope.

Method is not executing any customizations for remove dependencies routine (custom code in RemoveObjectDependencies(bool, bool) or 'removedependencies' query). All customizations must be called prior this method or handled within BulkDelete event.

See Also

BulkInsert(IEnumerable<TInfo>, BulkInsertSettings)

Bulk inserts an enumerable of TInfo.

void BulkInsert(IEnumerable<TInfo> objects, BulkInsertSettings settings = null)

Parameters

objects IEnumerable<TInfo>

Enumerable of TInfo to be inserted.

settings BulkInsertSettings

Configuration for the bulk insert, e.g. timeout. If null, default configuration is used.

Remarks

Info object ID is not set during the bulk insert operation.

Exceptions

ArgumentNullException

Thrown when objects is null.

See Also
BulkInsert<TInfo>(IInfoProvider<TInfo>, IEnumerable<TInfo>, BulkInsertSettings)

BulkUpdate(IEnumerable<KeyValuePair<string, object>>, IWhereCondition, bool)

Bulk updates info objects based on the given condition using the values provided.

void BulkUpdate(IEnumerable<KeyValuePair<string, object>> values, IWhereCondition where, bool useApi = false)

Parameters

values IEnumerable<KeyValuePair<string, object>>

New values for the data as an enumeration of column names and their corresponding values.

where IWhereCondition

Where condition filtering the objects to be updated, or null.

useApi bool

Specifies whether to perform the update using the API, or using a DB query.

Exceptions

ArgumentNullException

Thrown when values is null.

See Also
BulkUpdate<TInfo>(IInfoProvider<TInfo>, IEnumerable<KeyValuePair<string, object>>, IWhereCondition, bool)

BulkUpdate(string, QueryDataParameters, IWhereCondition)

Bulk updates info objects based on the given condition using the updateExpression provided.

void BulkUpdate(string updateExpression, QueryDataParameters updateParameters, IWhereCondition where)

Parameters

updateExpression string

Update expression (e.g. [Column] = [Column] * 2 or [Column] = @ParameterValue).

updateParameters QueryDataParameters

Parameters for the update expression, or null.

where IWhereCondition

Where condition filtering the objects to be updated, or null.

Remarks

It is strongly recommended to use query data parameters for specifying values for the update expression to prevent possible vulnerabilities.

Exceptions

ArgumentException

Thrown when updateExpression is null or empty.

See Also