[]
        
(Showing Draft Content)

C1.Data.Transactions.ClientTransaction

ClientTransaction Class

Represents a transaction that tracks client-side changes and can roll them back.

Inheritance
ClientTransaction
Namespace: C1.Data.Transactions
Assembly: C1.Data.Entity.4.8.dll
Syntax
public class ClientTransaction : ITransaction, IDisposable, INotifyPropertyChanged
Remarks

To create a new independent transaction, use the CreateTransaction() method. To create a child transaction, use the constructor.

Constructors

Name Description
ClientTransaction(ClientTransaction)

Initializes a child (nested) transaction, a new instance of the ClientTransaction class with a specified parent transaction.

Properties

Name Description
HasChanges

Gets a value indicating whether any changes were made in the scope of this transaction.

State

Gets the state the transaction is in.

Methods

Name Description
Commit()

Commits the transaction if it was not committed before. Commits changes that were made while this transaction's scope was open.

Dispose()

Disposes of the ClientTransaction.

Rollback()

Rolls back the transaction.

Scope()

Opens the transaction scope.

ScopeDataContext(object)

Wraps an object so the transaction scope is automatically opened when a value is being assigned to a property of the wrapped object.

Events

Name Description
PropertyChanged

Occurs when a property value changes, after it has been changed.