expressappframework-112571-business-model-design-orm-built-in-business-classes-and-interfaces.md
The XAF features the Business Class Library with interfaces for XAF modules and the interface implementations for supported ORMs (XPO and EF Core).
The Business Class Library consists of the following assemblies:
DevExpress.Persistent.BaseImpl.Xpo.v25.2.dllContains ready-to-use XPO persistent classes.DevExpress.Persistent.BaseImpl.EFCore.v25.2.dllContains ready-to-use Entity Framework Core classes.DevExpress.Persistent.Base.v25.2.dllContains interfaces and helper classes used in XAF Additional Modules. Classes implementing these interfaces are available in the DevExpress.Persistent.BaseImpl.* assemblies listed above.
Note
You can use XAF module-specific or service business classes that implement XAF module interfaces as is, like ReportDataV2, FileData, and DashboardData.
Assembly: DevExpress.Persistent.Base.v25.2.dll
Use service interfaces from the DevExpress.Persistent.Base.v25.2.dll assembly to integrate your business classes to XAF modules like Security System.
Examples:
Assemblies:
The Business Class Library allows you to do the following:
To add a class from the Business Class Library to the UI construction process, use the ModuleBase.AdditionalExportedTypes property.
If your custom business classes are named the same way as classes from the Business Class Library (for example, Event), you receive the following errors:
To avoid these errors, use the ModelNodesGeneratorSettings.SetIdPrefix method as follows:
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.DC;
using DevExpress.ExpressApp.Updating;
using DevExpress.ExpressApp.Model.NodeGenerators;
namespace MySolution.Module {
public sealed partial class SolutionNameModule : ModuleBase {
public override void CustomizeTypesInfo(ITypesInfo typesInfo) {
base.CustomizeTypesInfo(typesInfo);
ModelNodesGeneratorSettings.SetIdPrefix(
typeof(MySolution.Module.BusinessObjects.Event),
"EventEx"
);
}
}
}
See Also
Change the Format Used for the FullAddress and FullName Properties