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.3.420.0 (24.3.420.0)
Syntax public void Ensure(
Transaction transaction,
Object id
)
Public Sub Ensure (
transaction As Transaction,
id As Object
)
public:
void Ensure(
Transaction^ transaction,
Object^ id
)
member Ensure :
transaction : Transaction *
id : Object -> unit
Parameters
- transaction
- Type: AGI.FoundationTransaction
The transaction for which to ensure an entity identifier. - id
- Type: SystemObject
The entity identifier to ensure.
See Also