UnitOfWorkCommitAsync Method (ITransaction, Boolean) |
Async variant of
Commit(ITransaction, Boolean).
Commits this unit of work. It will first add all entities in the added collections to the correct bins, then it will start
by first inserting all new entities, then saving all updates and then performing the deletes.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.7.0.0 (5.7.0)
Syntax public Task<int> CommitAsync(
ITransaction transactionToUse,
bool autoCommit
)
Public Function CommitAsync (
transactionToUse As ITransaction,
autoCommit As Boolean
) As Task(Of Integer)
Parameters
- transactionToUse
- Type: SD.LLBLGen.Pro.ORMSupportClassesITransaction
Transaction to use. All entities to process will be added to this transaction, unless they're already part
of another transaction. - autoCommit
- Type: SystemBoolean
if true, it will commit/rollback the transaction passed in using the following rules:
- if no exception is thrown: commit
- if an exception is thrown: rollback
Return Value
Type:
TaskInt32
The total # of entities affected by all actions performed in the Commit method
Exceptions See Also