XPClassInfo.CreateNewObject(Session) Method

Creates a new persistent object.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.2.dll

Declaration

public virtual object CreateNewObject(
    Session session
)
Public Overridable Function CreateNewObject(
    session As Session
) As Object
public virtual object CreateNewObject(
    Session session
)
Public Overridable Function CreateNewObject(
    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 newly created persistent object.

Returns

Type Description
Object

An object which is the newly created persistent object.

Remarks

After the CreateNewObject method creates an object, it is marked as "new", to be inserted into the database later and its PersistentBase.AfterConstruction method is invoked.

See Also