Skip to main content
.NET 6.0+

WinApplication.SaveModelChanges() Method

Saves the Application Model changes made by an end-user, up to the current moment, to the storage (Model.User.xafml file, by default).

Namespace: DevExpress.ExpressApp.Win

Assembly: DevExpress.ExpressApp.Win.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Win

Declaration

public override void SaveModelChanges()

Remarks

Overrides the XafApplication.SaveModelChanges method. By default, this method is called when the application is closed. So, all the changes made from the application start until the end are saved to the Model.User.xafml file. You can call this method at any time during the application run. For example, you can implement an Action that allows end-users to save the changes made up to the current moment. To prevent saving changes at the end of the application run, set the WinApplication.IgnoreUserModelDiffs property to true.

You can save user changes to another storage; for example, to the database. For this purpose, handle the XafApplication.CreateCustomUserModelDifferenceStore event.

See Also