IModelSynchronizable Interface
Declares members implemented by classes used to persist the configuration of an entity into the Application Model.
Namespace: DevExpress.ExpressApp.Model
Assembly: DevExpress.ExpressApp.v24.2.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Remarks
This interface is implemented by various built-in XAF classes and exposes two methods. The IModelSynchronizable.ApplyModel method persists the configuration of an entity into the Application Model. The IModelSynchronizable.SynchronizeModel method sets up the entity according to the configuration stored in the Application Model.
One of the built-in classes implementing the IModelSynchronizable interface is the ListEditor class. To ensure correct functioning, each built-in List Editor overrides the protected ListEditor.CreateModelSynchronizer method, to create a specific model synchronizer. This model synchronizer’s methods are called by XAF via the ListEditor.ApplyModel and ListEditor.SaveModel methods. You can specify an additional custom model synchronizer to be used by a built-in List Editor by handling its DevExpress.ExpressApp.Editors.ListEditor.CreateCustomModelSynchronizer
event.
When creating a custom model synchronizer, it is recommended that you derive from the ModelSynchronizer<T, V> class. Its implementation already contains the necessary infrastructure code so that you can focus on the model synchronization logic.