OperationBehaviorAttribute::TransactionAutoComplete Property
Gets or sets a value that indicates whether to automatically complete the current transaction scope if no unhandled exceptions occur.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Property Value
Type: System::Booleantrue to complete the transaction scope automatically on successful execution of the operation; otherwise, false. The default is true.
Set the TransactionAutoComplete property to false to complete or abort transactions directly in the code for the operation.
Handled exceptions can be thrown in the course of the operation without automatically aborting the transaction. Only unhandled exceptions trigger an automatic abort.
The following code example shows an operation that executes within a mandatory distributed transaction. The TransactionScopeRequired property indicates that the operation executes under a transaction scope and the TransactionAutoComplete property indicates that if no unhandled exceptions occur, the transaction scope is completed automatically. If an unhandled exception does occur, the transaction is aborted.
Available since 3.0