Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

XPLiteObject Class

Implements the IXPObject.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v21.1.dll


public abstract class XPLiteObject :


When declaring a persistent object, you can use the XPLiteObject class as an anscestor for the object if the optimistic concurrency feature is not required. Otherwise, use the XPBaseObject class.

If your persistent class derives from the XPLiteObject class, the OptimisticLockingAttribute isn’t applied. In this instance, you should manually apply this attribute to support optimistic locking. This can be useful when it is needed to map to existing databases.

The following code demonstrates how to declare a persistent object.

using DevExpress.Xpo;
using System.ComponentModel;

// Other base classes:

public class MyClass : XPLiteObject {
    public MyClass(Session session) : base(session) { }
    // XPLiteObject does not have a built-in key and you need to add your own key
    [Key(AutoGenerate = true), Browsable(false)]
    public int Oid { get; set; }
    string fMyProperty;
    public string MyProperty {
        get { return fMyProperty; }
        set { SetPropertyValue(nameof(MyProperty), ref fMyProperty, value); }

The following code snippets (auto-collected from DevExpress Examples) contain references to the XPLiteObject class.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.


See Also