![]() | |
BcfTransaction Class |
Namespace: CalculationWorks.BusinessModel
The BcfTransaction type exposes the following members.
Name | Description | |
---|---|---|
![]() | BcfTransaction | Initializes a new instance of the BcfTransaction class. To begin a transaction use BcfDataSet.BeginTransaction. To use custom transactions see BcfDataSetTransactionFactory and example Ignoring changes on spcific columns in HasChanges. |
Name | Description | |
---|---|---|
![]() | AutoRollback | |
![]() | CompensationRepository |
Gets the compensation repository.
|
![]() | DataSet |
Gets the BcfDataSet the transaction belongs to.
|
![]() | HasInvalidItems |
Gets a value indicating whether this instance has outstanding calculations (computed cells and validators).
|
![]() | IsAlive |
Gets a value indicating whether this instance is alive.
|
![]() | IsCommitted |
Gets a value indicating whether this instance is committed.
|
![]() | IsCurrent |
Gets a value indicating whether this instance is current.
|
![]() | IsRolledBack |
Gets a value indicating whether this instance is rolled back.
|
![]() | IsSubTransaction |
Gets a value indicating whether this instance is sub transaction.
|
Name | Description | |
---|---|---|
![]() | AddItem |
Adds the IBcfUndoRedoItem to the transactions compensation repository.
|
![]() | AddItems |
Adds the items to the transactions compensation repository.
|
![]() | BeginSubTransaction |
Begins a sub transaction.
|
![]() | BeginSubTransaction(BcfTransactionBuilder) |
Begins a sub transaction.
|
![]() | Commit |
Commits all changes within this transaction.
|
![]() | Compute | |
![]() | Compute(Boolean) | |
![]() | CreateSavePoint |
Creates a BcfSavePoint.
|
![]() | EnforceKeyConstraints |
Sets a value indicating whether key constraints will be enforced or not.
|
![]() | EnterDumbMode | Sets all computed cells and validations to 'must recompute' and disables the internal change tracking until next call of Compute (implicit by BeginSubTransaction or Commit) or Rollback. When DumbMode ends all computed cells and validations will be recomputed. Very useful when loading data into an empty BcfDataSet. |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnforceKeyConstraints |
Gets a value indicating whether key constraints will be enforced or not.
|
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnCommit |
Called when commit will be performed.
|
![]() | OnCommitComplete |
Called when commit was executed.
|
![]() | OnDiscard |
Called when the transaction goes out of scope and DataSet.Behavior.CleanupOptions.Cleanup is set to true.
|
![]() | OnRollback |
Called when a rollback will be performed.
|
![]() | OnRollbackComplete |
Called after rollback was executed.
|
![]() | Redo |
Infrastructure. This method supports the infrastructure and is not intended to be used directly from your code.
|
![]() | Rollback |
Discards the transaction and restores the data from state before the transaction started.
|
![]() | Rollback(Exception) |
Discards the transaction and restores the data from state before the transaction started.
|
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | Undo |
Infrastructure. This method supports the infrastructure and is not intended to be used directly from your code.
|
Any update operation on a data object is wrapped in a transaction. Setting a value or adding a row will create a transaction, execute the operation and commit the transaction. Before every begin and end of any transaction or subtransaction the outstanding calculations and validations will be processed. To improve performance and get a nice undo repository when more than one cell update is required, it is recommended to use transactions explicit. Begin a try-block immediately after the transaction is created. The transaction commit should always be the last instruction inside the try-block. Rollback failed transactions.
How to use a custom transaction class see: Ignoring changes on spcific columns in HasChanges