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 Class

Maintains a list of persistent objects that are affected by a transaction. Keeps track of every change to every persistent object during a transaction that can affect a data store. See Unit of Work.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

[ToolboxTabName("DX.19.2: ORM Components")]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "UnitOfWork")]
public class UnitOfWork :
    Session
<ToolboxTabName("DX.19.2: ORM Components")>
<ToolboxBitmap(GetType(ToolboxIconsRootNS), "UnitOfWork")>
Public Class UnitOfWork
    Inherits Session
[ToolboxTabName("DX.19.2: ORM Components")]
public class UnitOfWork :
    Session
<ToolboxTabName("DX.19.2: ORM Components")>
Public Class UnitOfWork
    Inherits Session

Remarks

A unit of work maintains a list of persistent objects that are affected by a transaction. It keeps track of every change to every persistent object during a transaction that can affect a data store. With a single call to the UnitOfWork.CommitChanges method, all the changes made to persistent objects are automatically saved to a data store. While working with common sessions, you need to save each persistent object individually. The only requirement for this is that the property setters call the XPBaseObject.OnChanged method.

For more information and examples, see Unit of Work.

Implements

See Also