The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

Business Model Design

  • 2 min to read
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.

Tutorial_BMD_Lesson0_1

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

Tutorial_BMD_Lesson0_2

Tutorial_BMD_Lesson0_3

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