Back to Devexpress

Storage, ORM, and Business Model Design

expressappframework-113664-business-model-design-orm.md

latest2.8 KB
Original Source

Storage, ORM, and Business Model Design

  • Nov 28, 2024
  • 2 minutes to read

XAF allows you to build a Business Model with the following ORM tools:

|

ORM

|

Modeling Approaches

| | --- | --- | |

Entity Framework Core by Microsoft (Documentation)

|

  • Code First
  • Model First
  • Database First

| |

XPO ORM by DevExpress (Documentation)

|

  • Code First
  • Model First
  • Database First

|

Refer to the following topic for an ORM comparison table: Why We Recommend EF Core over XPO for New Development

Tip

To manage and display data not obtained from ORM, use non-persistent objects.

Business Classes

A business class is a model of a real-world object your application operates with (for example, Contact, Address, Task, etc.) Each class that takes part in an XAF UI construction process is a business class, and can be a class mapped to a database table – Entity Framework Entity or XPO Persistent Object.

XAF collects your business classes and generates UI elements for them.

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 also takes part in UI construction. Refer to the following topic for more details: Non-Persistent Objects.

Note

Refer to the following documentation section for information on Data Types for which XAF can automatically generate a UI: Data Types Supported by built-in Editors.

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

See Also

Business Model Design with XPO

Business Model Design with Entity Framework Core

Cross-Platform .NET App UI: Desktop & Web Business Apps in Hours (DevExpress XAF Introduction)