Skip to main content
A newer version of this page is available. .

XPO Classes Comparison

You can derive persistent objects from the PersistentBase, XPBaseObject, XPObject, XPLiteObject and XPCustomObject classes.

XPOClassHierarchy

When objects are derived from a class, XPO features are automatically enabled for this object. For example, the OptimisticLockingAttribute is automatically applied to objects derived from the PersistentBase, XPBaseObject, XPCustomObject or XPObject class. This enables the optimistic locking feature. However, this feature is disabled when objects are derived from the XPLiteObject class.

The following table illustrates the differences between XPO classes:

Class Name Deferred Deletion Optimistic Locking Built-in OID key
PersistentBase No Yes No
XPBaseObject No Yes No
XPLiteObject No No No
XPCustomObject Yes Yes No
XPObject Yes Yes Yes

Tip

We recommend that you use the PersistentBase class as the base class for persistent classes in WPF applications. For additional information, see XPO Best Practices in WPF applications.