Back to Devexpress

Session.AfterCommitTransaction Event

xpo-devexpress-dot-xpo-dot-session-0e4d8aae.md

latest3.2 KB
Original Source

Session.AfterCommitTransaction Event

Occurs after a transaction has been completed via the COMMIT operation.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public event SessionManipulationEventHandler AfterCommitTransaction
vb
Public Event AfterCommitTransaction As SessionManipulationEventHandler

Event Data

The AfterCommitTransaction event's data class is SessionManipulationEventArgs. The following properties provide information specific to this event:

PropertyDescription
SessionGets the session currently being processed.

Remarks

The AfterCommitTransaction event is raised after a transaction has been completed via the COMMIT operation (Session.CommitTransaction, Session.CommitTransactionAsync, ExplicitUnitOfWork.CommitTransaction, or ExplicitUnitOfWork.CommitTransactionAsync). The event parameter’s SessionManipulationEventArgs.Session property allows the processed session to be identified.

When a transaction is about to be completed via the COMMIT operation, the Session.BeforeCommitTransaction event is raised.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AfterCommitTransaction event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF_generate-a-sequential-number-for-a-persistent-object-within-a-database-transaction/CS/XPO/SequenceGenerator/SequenceGenerator.Module/SequenceClasses/UserFriendlyIdPersistentObject.cs#L85

csharp
if(!(Session is NestedUnitOfWork)) {
    Session.AfterCommitTransaction += Session_AfterCommitTransaction;
    Session.AfterRollbackTransaction += Session_AfterRollBack;

See Also

Session Class

Session Members

DevExpress.Xpo Namespace