IDataAccessAdapter.SaveEntityAsync Method (IEntity2, Boolean, CancellationToken) |
Async variant of
SaveEntity(IEntity2, Boolean).
Saves the passed in entity to the persistent storage. If the entity is new, it will be inserted, if the entity is existent, the changed
entity fields will be changed in the database. Will do a recursive save.
Will pass the concurrency predicate returned by GetConcurrencyPredicate(ConcurrencyPredicateType.Save) as update restriction.
Namespace: SD.LLBLGen.Pro.ORMSupportClassesAssembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
SyntaxTask<bool> SaveEntityAsync(
IEntity2 entityToSave,
bool refetchAfterSave,
CancellationToken cancellationToken
)
Function SaveEntityAsync (
entityToSave As IEntity2,
refetchAfterSave As Boolean,
cancellationToken As CancellationToken
) As Task(Of Boolean)
Parameters
- entityToSave
- Type: SD.LLBLGen.Pro.ORMSupportClasses.IEntity2
The entity to save - refetchAfterSave
- Type: System.Boolean
When true, it will refetch the entity from the persistent storage so it will be up-to-date
after the save action. - cancellationToken
- Type: System.Threading.CancellationToken
The cancellation token.
Return Value
Type:
Task<Boolean>
true if the save was succesful, false otherwise.
Remarks
Will use a current transaction if a transaction is in progress
See Also