XPClassInfo.CreateObject(Session) Method

Instantiates an existing persistent object upon loading it from the database.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public virtual object CreateObject(
    Session session
)
Public Overridable Function CreateObject(
    session As Session
) As Object
public virtual object CreateObject(
    Session session
)
Public Overridable Function CreateObject(
    session As Session
) As Object

Parameters

Name Type Description
session Session

A Session object which represents the session. This property is assigned to the object's PersistentBase.Session property.

Parameters

Name Type Description
session Session

A Session object which represents the session. This property is assigned to the object's PersistentBase.Session property.

Returns

Type Description
Object

An object which is the instantiated persistent object.

Returns

Type Description
Object

An object which is the instantiated persistent object.

Remarks

The CreateObject method is used internally by XPO to instantiate persistent objects existing in the database. Do not use this method to create new persistent objects. Use the XPClassInfo.CreateNewObject method instead.

See Also