Click or drag to resize

EntitySetTEntityEnsure Method

Ensures that the entity with a specified EntityIdentifier is not removed or replaced with a different entity with the same identifier before a transaction is committed. If another transaction commits first and removes or replaces the entity, the transaction will raise a TransactionConflictException when it is committed. It is valid to call this method with an id that is not present in the entity set. In that case, a TransactionConflictException will be thrown if an entity with id is added to the entity set in another transaction.

Namespace:  AGI.Foundation.Tracking
Assembly:  AGI.Foundation.Tracking (in AGI.Foundation.Tracking.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax
public void Ensure(
	Transaction transaction,
	Object id
)

Parameters

transaction
Type: AGI.FoundationTransaction
The transaction for which to ensure an entity identifier.
id
Type: SystemObject
The entity identifier to ensure.
See Also