Back to Devexpress

WinApplication.SaveModelChanges() Method

expressappframework-devexpress-dot-expressapp-dot-win-dot-winapplication-5abafedc.md

latest2.3 KB
Original Source

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.v25.2.dll

NuGet Packages : DevExpress.ExpressApp.Win, DevExpress.ExpressApp.Win.Design

Declaration

csharp
public override void SaveModelChanges()
vb
Public Overrides Sub 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

WinApplication Class

WinApplication Members

DevExpress.ExpressApp.Win Namespace