.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+
The page you are viewing does not exist in the .NET Core 3.0+ platform documentation. This link will take you to the parent topic of the current section.

UnitOfWork.CommitChanges() Method

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

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v20.1.dll

Declaration

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