IModelDifferenceAspect Interface
Declares members implemented by entities (persistent classes) used to store model difference aspects in the database.
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v24.2.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 IModelDifferenceAspect aspect with the 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 ModelDifferenceAspect class from the DevExpress.Persistent.BaseImpl namespace is the built-in implementation of this interface that can be used in XPO applications. In Entity Framework applications, the similar ModelDifferenceAspect entity from the DevExpress.Persistent.BaseImpl.EF namespace can be used.
To create a custom persistent container for the model difference aspects, 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.