IModelDifference Interface
Declares members implemented by entities (persistent classes) used to store model differences in the database.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Remarks
When model differences are stored in the database, each user has the associated IModelDifference object. The IModelDifference.UserId property specifies the identifier of the user who owns the current IModelDifference object. If the UserId is not specified, the current IModelDifference object specifies the model differences layer shared by all users (administrator model differences). The IModelDifference.Aspects property exposes the list of model difference aspects (IModelDifferenceAspect objects). The aspect with an empty IModelDifferenceAspect.Name property is the default culture-neutral aspect. Aspects with the Name set to a certain language code are used in localized applications. The XML code of a particular model difference aspect is available via the IModelDifferenceAspect.Xml property.
The ModelDifference class from the DevExpress.Persistent.BaseImpl namespace is a built-in implementation of this interface that can be used in XPO applications. In Entity Framework applications, the similar ModelDifference entity from the DevExpress.Persistent.BaseImpl.EF namespace can be used.
To create a custom persistent container for the model differences, do the following:
- Implement the IModelDifference and IModelDifferenceAspect interfaces.
- Establish the one-to-many association between these classes using the IModelDifference.Aspects and IModelDifferenceAspect.Owner properties.
- Pass the implemented IModelDifference type to the ModelDifferenceDbStorage constructor, as demonstrated in the How to: Store the Application Model Differences in the Database topic.