Click or drag to resize
DataAccessAdapterBaseUpdateEntitiesDirectlyAsync Method (IEntity2, IRelationPredicateBucket, CancellationToken)
Async variant of UpdateEntitiesDirectly(IEntity2, IRelationPredicateBucket). Updates all entities of the same type or subtype of the entity entityWithNewValues directly in the persistent storage if they match the filter supplied in filterBucket. Only the fields changed in entityWithNewValues are updated for these fields. Entities of a subtype of the type of entityWithNewValues which are affected by the filterBucket's filter will thus also be updated.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.3.0.0 (5.3.0)
Syntax
public override Task<int> UpdateEntitiesDirectlyAsync(
	IEntity2 entityWithNewValues,
	IRelationPredicateBucket filterBucket,
	CancellationToken cancellationToken
)

Parameters

entityWithNewValues
Type: SD.LLBLGen.Pro.ORMSupportClassesIEntity2
Entity object which contains the new values for the entities of the same type and which match the filter in filterBucket. Only fields which are changed are updated.
filterBucket
Type: SD.LLBLGen.Pro.ORMSupportClassesIRelationPredicateBucket
filter information to filter out the entities to update.
cancellationToken
Type: System.ThreadingCancellationToken
The cancellation token.

Return Value

Type: TaskInt32
the number of physically updated entities. Use this number only to test if the update succeeded (so value is > 0).

Implements

IDataAccessAdapterUpdateEntitiesDirectlyAsync(IEntity2, IRelationPredicateBucket, CancellationToken)
See Also