DataScopeCommitChangesAsync Method (ITransactionController, CancellationToken) |
Async variant of
CommitChanges(ITransactionController)
Commits the changes tracked by this scope. Use this method to commit the changes using a transaction controller directly.
It uses the passed in controller (Adapter: an IDataAccessAdapter instance will do,
SelfServicing: an ITransaction instance will do) to commit the unit of work. If the controller has already a transaction in progress,
that transaction is used to perform the work, otherwise a new transaction is started.
To commit the work using external code, e.g. another tier or a service, please use the CommitChanges overload which accepts a
Func instead.
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> CommitChangesAsync(
ITransactionController controller,
CancellationToken cancellationToken
)
Public Function CommitChangesAsync (
controller As ITransactionController,
cancellationToken As CancellationToken
) As Task(Of Boolean)
Parameters
- controller
- Type: SD.LLBLGen.Pro.ORMSupportClassesITransactionController
The controller. - cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token.
Return Value
Type:
TaskBoolean
true, if 1 or more actions were performed by the unit of work, false otherwise
Remarks
The unit of work uses as workorder: Inserts, Updates, UpdatesPerformedDirectly, DeletesPerformedDirectly,
Deletes.
See Also