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.
XAF provides built-in support for the following external ORM tools that provide mapping between your coded or designed model and the database.
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.
You can follow these workflows when creating a business classes.
Begin by implementing XPO persistent classes of EF entities that define your data model.
Begin with the designer. Draw boxes and lines in a designer provided by the chosen ORM tool to define objects and their relationships.
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.