Click or drag to resize

BcfTransactionCommit Method

Commits all changes made in this transaction.

Namespace:  CalculationWorks.BusinessModel
Assembly:  CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntax
public BcfTransaction Commit()

Return Value

Type: BcfTransaction
This.
Exceptions
ExceptionCondition
InvalidOperationException

IsCurrent is

or

Transaction caused an invalid state and must rollback (see: MustRollback)

or

DataSet is Locked.

BcfUpdateExceptionThe implementations specifies the details.
Remarks

Commit works different on subtransactions and transactions. When a subtransaction commits, its state will be merged into its parent transaction state. When a transaction commits while undo/redo is enabled, the transaction will be added to UndoRepository - except the transaction is empty*.

empty*: The transaction contains only cell-updates on columns with == false or (only when using file-based undo) fault-changed items.

IBcfUndoRedoItemValueChanged-items on columns with ShouldPersist == true causes CurrentDataStateId-renewal. This adds a BcfUndoRedoItemStateId to transaction. So the transaction is never empty when updated cells of columns having ShouldPersist == true.

Note Note
CurrentDataStateId-renewal can be disabled by setting ManageStateId = false.

See Also