Click or drag to resize

DataAccessAdapterCoreSaveEntityAsync Method (IEntity2, Boolean, Boolean)

Async variant of SaveEntity(IEntity2, Boolean, 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 pass the concurrency predicate returned by GetConcurrencyPredicate(ConcurrencyPredicateType.Save) as update restriction.

Namespace:  SD.LLBLGen.Pro.ORMSupportClasses
Assembly:  SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.6.0.0 (5.6.19.0117)
Syntax
public Task<bool> SaveEntityAsync(
	IEntity2 entityToSave,
	bool refetchAfterSave,
	bool recurse
)

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.
recurse
Type: SystemBoolean
When true, it will save all dirty objects referenced (directly or indirectly) by entityToSave also.

Return Value

Type: TaskBoolean
true if the save was succesful, false otherwise.

Implements

IDataAccessAdapterSaveEntityAsync(IEntity2, Boolean, Boolean)
Remarks
Will use a current transaction if a transaction is in progress
See Also