.NET Standard 2.0+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.SaveModelChanges() Method

Saves the changes made by an end-user, up to the current moment, to the differences storage.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v20.2.dll


public virtual void SaveModelChanges()


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 instance, you can implement an Action that allows end-users to save the changes made, up to the current moment.


Since end-user changes are only saved in Windows Forms applications, do not use this method in ASP.NET Web applications.

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

See Also