.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.
.NET Core 3.0+

EFObjectSpace.IsNewObject(Object) Method

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

Namespace: DevExpress.ExpressApp.EF

Assembly: DevExpress.ExpressApp.EF.v19.2.dll

Declaration

public override bool IsNewObject(
    object obj
)
Public Overrides Function IsNewObject(
    obj As Object
) As Boolean
public override bool IsNewObject(
    object obj
)
Public Overrides Function IsNewObject(
    obj As Object
) As Boolean

Parameters

Name Type Description
obj Object

An object to be tested.

Parameters

Name Type Description
obj Object

An object to be tested.

Returns

Type Description
Boolean

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

Returns

Type Description
Boolean

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

Remarks

The objects that are created both directly via the BaseObjectSpace.CreateObject method and by means of built-in Actions (e.g. the New Action) are not saved to the database immediately. They are saved only when the BaseObjectSpace.CommitChanges method is called, directly or by means of the built-in Actions (e.g. 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. In addition, it returns false if the object does not belong to the current Object Space.

See Also