Skip to main content

Built-in Business Classes & Interfaces

  • 3 minutes to read

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.dll
Contains ready-to-use XPO persistent classes.
DevExpress.Persistent.BaseImpl.EFCore.v25.2.dll
Contains ready-to-use Entity Framework Core classes.
DevExpress.Persistent.Base.v25.2.dll
Contains 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.

Interfaces for XAF Modules

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:

Interface Implementations for Supported ORMs

Assemblies:

  • DevExpress.Persistent.BaseImpl.Xpo.v25.2.dll
  • DevExpress.Persistent.BaseImpl.EFCore.v25.2.dll

The Business Class Library allows you to do the following:

  • Use classes from the DevExpress.Persistent.BaseImpl***.25.2.dll assemblies.
  • Extend persistent classes from the DevExpress.Persistent.BaseImpl***.25.2.dll assemblies to add custom functionality.
  • Use the DevExpress.Persistent.BaseImpl***.25.2.dll assembly sources (shipped with the XAF installation) as an example when developing your own business class library.
  • The Business Class Library assemblies do not have references to other XAF assemblies. This allows you to use services defined there (like validation, audit trail, etc.) in non-XAF applications.

To add a class from the Business Class Library to the UI construction process, use the ModuleBase.AdditionalExportedTypes property.

Create Custom Classes with Class Names that Business Class Library Contains

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:

  • DuplicateModelNodeIdException at runtime or in the Model Editor.
  • View layout collisions in the Model Editor.

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