Click or drag to resize

EntitySet<TEntity>.Ensure 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: 25.1.421.0 (25.1.421.0)
Syntax
public void Ensure(
	Transaction transaction,
	Object id
)

Parameters

transaction
Type: AGI.Foundation.Transaction
The transaction for which to ensure an entity identifier.
id
Type: System.Object
The entity identifier to ensure.
See Also