Cocktail Help Reference
CommitAsync Method
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > IUnitOfWork Interface : CommitAsync Method



onSuccess
Callback to be called if the commit was successful.
onFail
Callback to be called if the commit failed.

Glossary Item Box

Commits all pending changes to the underlying data source.

Syntax

Visual Basic (Declaration) 
Function CommitAsync( _
   Optional ByVal onSuccess As Action(Of SaveResult), _
   Optional ByVal onFail As Action(Of Exception) _
) As OperationResult(Of SaveResult)
Visual Basic (Usage)Copy Code
Dim instance As IUnitOfWork
Dim onSuccess As Action(Of SaveResult)
Dim onFail As Action(Of Exception)
Dim value As OperationResult(Of SaveResult)
 
value = instance.CommitAsync(onSuccess, onFail)

Parameters

onSuccess
Callback to be called if the commit was successful.
onFail
Callback to be called if the commit failed.

Return Value

Asynchronous operation result.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.