Back to Devexpress

IObjectSpace.ObjectSaving Event

expressappframework-devexpress-dot-expressapp-dot-iobjectspace-c96a87b3.md

latest2.4 KB
Original Source

IObjectSpace.ObjectSaving Event

Occurs before saving changes made to a specified persistent object to the database.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
event EventHandler<ObjectManipulatingEventArgs> ObjectSaving
vb
Event ObjectSaving As EventHandler(Of ObjectManipulatingEventArgs)

Event Data

The ObjectSaving event's data class is ObjectManipulatingEventArgs. The following properties provide information specific to this event:

PropertyDescription
ObjectProvides access to the object that is being manipulated.

Remarks

Raise this event before saving changes made to the object passed as the handler’s ObjectManipulationEventArgs.Object parameter.

When implementing the IObjectSpace interface in the BaseObjectSpace class’ descendant, you don’t have to declare this event. It’s declared within the BaseObjectSpace class. The BaseObjectSpace.OnObjectSaving method raises this event. So, you should only invoke the OnObjectSaving method before an object is saved.

Note

The object changes which are about to be saved to the database are the changes made after the last call of the IObjectSpace.CommitChanges method.

See Also

Committed

Committing

CustomCommitChanges

ObjectSaving

IObjectSpace Interface

IObjectSpace Members

DevExpress.ExpressApp Namespace