Skip to main content
.NET 6.0+

IObjectSpace.IsNewObject(Object) Method

Indicates whether a specified object has been created but has not been saved to the database.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v23.2.dll

NuGet Package: DevExpress.ExpressApp


bool IsNewObject(
    object obj


Name Type Description
obj Object

A object to be tested.


Type Description

true if the specified object has not yet been saved to the database; otherwise, false.


The objects that are created both directly via the IObjectSpace.CreateObject method and by means of built-in Actions (for example, the New Action) are not saved to the database immediately. They are saved only when the IObjectSpace.CommitChanges method is called, directly or by means of built-in Actions (for example, the Save Action).

Until an object created within the current Object Space is not saved to the database, the IsNewObject method returns true. After saving, the IsNewObject method returns false. It is presumed that this property must return false if the object passed as the parameter is not persistent, or if it does not belong to the current Object Space.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsNewObject(Object) 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