XPClassInfo.CreateNewObject(Session) Method

Creates a new persistent object.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v21.2.dll


public virtual object CreateNewObject(
    Session session


Name Type Description
session Session

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


Type Description

An object which is the newly created persistent object.


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.

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateNewObject(Session) method.


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