EFCoreObjectSpace.IsNewObject(Object) Method
Indicates whether a specified object is created but not saved to the database.
Namespace: DevExpress.ExpressApp.EFCore
Assembly: DevExpress.ExpressApp.EFCore.v24.2.dll
NuGet Package: DevExpress.ExpressApp.EFCore
Declaration
Parameters
Name | Type | Description |
---|---|---|
obj | Object | A object this method checks. |
Returns
Type | Description |
---|---|
Boolean | true if a specified object is created but not saved to the database; otherwise, false. |
Remarks
When you use the BaseObjectSpace.CreateObject method or built-in Actions (for example, New) to create new objects, these objects are not saved to the database immediately. To save them, call the BaseObjectSpace.CommitChanges method or use corresponding built-in Actions (for example, Save). The IsNewObject method returns true until you save an object created within the current Object Space to the database. This method returns false after you save this object or if the specified object does not belong to the current Object Space.