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+

IXPObject Interface

The interface that provides the essential functionality for persistent objects.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public interface IXPObject : IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, IXPDictionaryProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider
Public Interface IXPObject
    Inherits IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, IXPDictionaryProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider
public interface IXPObject : IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, IXPDictionaryProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider
Public Interface IXPObject
    Inherits IXPSimpleObject, IXPClassInfoAndSessionProvider, IXPClassInfoProvider, IXPDictionaryProvider, ISessionProvider, IObjectLayerProvider, IDataLayerProvider

Remarks

To make any object persistent (so that it can be stored to/restored from a data store) you can implement the IXPObject or IXPSimpleObject interface. The IXPObject interface extends its ancestor (IXPSimpleObject) by declaring a set of methods that are called by a Session when significant changes occur during the object's lifetime.

The base class that implements the IXPObject interface is XPBaseObject. So, rather than implementing the IXPObject or IXPSimpleObject interface for a custom object, you can inherit it from the XPBaseObject class or one of its descendants.

It's also possible to make any object persistent by using the PersistentAttribute attribute.

Note

It is recommended that you implement a constructor that takes a Session parameter. To work with your own session, you have to pass it to the constructor of your persistent object(s) and call the base constructor with this session as a parameter. For information, see Working with Sessions.

See Also