UnitOfWork2CommitAsync Method (IDataAccessAdapter, CancellationToken) |
Async variant of
Commit(IDataAccessAdapter).
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.6.0.0 (5.6.19.0117)
Syntax public Task<int> CommitAsync(
IDataAccessAdapter adapterToUse,
CancellationToken cancellationToken
)
Public Function CommitAsync (
adapterToUse As IDataAccessAdapter,
cancellationToken As CancellationToken
) As Task(Of Integer)
Parameters
- adapterToUse
- Type: SD.LLBLGen.Pro.ORMSupportClassesIDataAccessAdapter
Adapter to use. It will start a new transaction if no transaction is in progress. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token.
Return Value
Type:
TaskInt32
The total # of entities affected by all actions performed in the Commit method
Exceptions Remarks If no transaction is in progress on the passed in adapter, this unit of work object will autocommit the transaction started by
this unit of work object.
See Also