Skip to main content
.NET Framework 4.6.2+

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IModelSynchronizable Interface

In This Article

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

public interface IModelSynchronizable

#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.

See Also