The requested page is not available for the requested platform. You are viewing the content for Default platform.

Business Model Design Basics

There are several different ways to design a Business Model in XAF. This topic will help you to choose what data access technology and modeling approach to use and provide you with basic information about XAF's Business Model design.

Data Access Technologies

XAF provides built-in support for the following external ORM tools that provide mapping between your coded or designed model and the database.

Business Classes

Business Class is a model of a real-world object your application operate with (e.g., Contact, Address, Task, etc.). Each class that takes part in an XAF UI construction process is a business class. It can be a class mapped to a database table - Entity Framework Entity or XPO Persistent Object. Such classes are collected from your code, and UI elements are created for them automatically. If you do not need to persist an object state to the database, you can declare a regular class and apply the DomainComponentAttribute attribute to it - such a class will also take part in UI construction.


The information on Data Types for which XAF can automatically generate a UI is provided in the Data Types Supported by built-in Editors documentation section.

If the type you need to use can be displayed in the UI, but the ORM tool you use cannot store this type in the database, refer to the Mapping Complex Types to the Database article.

Modeling Approaches

You can follow these workflows when creating a business classes.

  • Code First

    Begin by implementing XPO persistent classes of EF entities that define your data model.

  • Model First

    Begin with the designer. Draw boxes and lines in a designer provided by the chosen ORM tool to define objects and their relationships.

  • Database First

    Programmers are often required to maintain a legacy database instead of building an application from scratch. Both XPO and EF can automatically generate a data model for a specified database. The created visual model or code can then be customized and extended as required.

See Also