The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

UnitOfWork.CommitChanges() Method

Commits all the changes made to persistent objects to a data store.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public void CommitChanges()
Public Sub CommitChanges
public void CommitChanges()
Public Sub CommitChanges

Remarks

A Unit of Work tracks every change to every persistent object during a transaction that can affect a data store. Its CommitChanges method commits all the changes made to persistent objects to a data store. The only requirement for this is that the property setters call the XPBaseObject.OnChanged method. For more information, see Unit of Work.

Calling the CommitChanges method automatically calls Session.CommitTransaction (in explicit units of work, ExplicitUnitOfWork.CommitTransaction is called).

Note

If a save operation fails (e.g. due to a database constraint violation), the following exceptions can be raised by XPO:

See Also