[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Collapse]Getting Started
  [Expand]Basic Tutorial (SimpleProjectManager Application)
  [Collapse]Comprehensive Tutorial (MainDemo Application)
   [Collapse]Business Model Design
     Create a Solution using the Wizard
    [Expand]Business Model Design with Entity Framework
    [Expand]Business Model Design with XPO
   [Expand]Extend Functionality
   [Expand]UI Customization
   [Expand]Extra Modules
   [Expand]Security System
 [Expand]Concepts
 [Expand]Design-Time Features
 [Expand]Deployment
 [Expand]Task-Based Help
  Frequently Asked Questions (FAQ)
 [Expand]API Reference
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Business Model Design

Note

This section is split into two parts, which describe the use of two different Object-relational mapping (ORM) tools: Entity Framework (EF) and eXpress Persistent Objects (XPO). You will start by choosing the one ORM you will use in your project and the subsequent steps will reflect your choice.

In this section, you will learn how to design a business model (database) when building business applications via the eXpressApp Framework. You will create business classes that will be mapped to database tables. You will also learn how to set relationships between classes, implement dependent properties, validate property values, and so on.

To design a business model, the following techniques will be used.

  • Use the Business Class Library

    The Business Class Library provides the most commonly used business classes, such as Person, Event, Task, etc. You can use a class from this library as is, or inherit from it to extend it.

  • From Scratch

    If you use XPO and the Business Class Library does not provide the appropriate business class, inherit from one of the Base Persistent Classes. When using EF, you can create business classes from scratch without inheritance, as demonstrated in the Code First to a New Database tutorial.

Tip

If you need to build an application based on an existing database, refer to the How to: Generate XPO Business Classes for Existing Data Tables or Use Entity Framework with an Existing Database topic.

After completing the tutorial, you will have WinForms and ASP.NET applications.

The ASP.NET application will provide almost the same functionality, but via a slightly different set of visual elements.

Proceed to Create a Solution using the Wizard to start the tutorial.

Is this topic helpful?​​​​​​​