.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.v21.1.dll

Declaration

public void 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.

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

Note

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

See Also