DataAccessAdapterBaseSaveEntityAsync Method (IEntity2, Boolean, IPredicateExpression, Boolean, CancellationToken) |
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.1.0.0 (5.1.0)
Syntax public override Task<bool> SaveEntityAsync(
IEntity2 entityToSave,
bool refetchAfterSave,
IPredicateExpression updateRestriction,
bool recurse,
CancellationToken cancellationToken
)
Public Overrides Function SaveEntityAsync (
entityToSave As IEntity2,
refetchAfterSave As Boolean,
updateRestriction As IPredicateExpression,
recurse As Boolean,
cancellationToken As CancellationToken
) As Task(Of Boolean)
Parameters
- entityToSave
- Type: SD.LLBLGen.Pro.ORMSupportClassesIEntity2
The entity to save - refetchAfterSave
- Type: SystemBoolean
When true, it will refetch the entity from the persistent storage so it will be up-to-date
after the save action. - updateRestriction
- Type: SD.LLBLGen.Pro.ORMSupportClassesIPredicateExpression
Predicate expression, meant for concurrency checks in an Update query. Will be ignored if the entity is new. This
predicate is used instead of a predicate produced by a set ConcurrencyPredicateFactory. - recurse
- Type: SystemBoolean
When true, it will save all dirty objects referenced (directly or indirectly) by entityToSave also. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token.
Return Value
Type:
TaskBoolean
true if the save was succesful, false otherwise.
Implements
IDataAccessAdapterSaveEntityAsync(IEntity2, Boolean, IPredicateExpression, Boolean, CancellationToken)Remarks
Will use a current transaction if a transaction is in progress
See Also