Business Model Design business model design

Note

This section is split into two parts, which describe the use of two different Object-relational mapping (ORM)

Note that
this section is divided into two portions, which describe two different object-relational mapping (ORM) using

 

tools: Entity Framework (EF) and eXpress Persistent Objects (XPO)

Tools: EF and 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.

You will first select the one you'll use ORM in the project, the next step will reflect your selection.
In this section, you will learn how to design a business model (database) when building business applications through eXpressApp framework. You will create a mapping database tables to business class. You will also learn how to set up the relationship between the class that implements the slave property, validating 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.

To design business model, using the following technique.

  • Use library services

         Business class library provides the most commonly used business class, such as Person, events, tasks, and so on. You can directly use this library classes can inherit it to expand it.

  • Start from scratch

          If you use XPO, while business class library does not provide the appropriate business class, lasting from one of the basic class inheritance. When using EF, you can start from scratch business class, without the need for succession, as shown in the code, first create a new database tutorials.

 

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.

Tip
If you need to build applications based on existing databases, see How to: Generate XPO business class for an existing data table, or use an existing database topics Entity Framework.
After completing this tutorial, you will have WinForms and ASP. Network applications.

Tutorial_BMD_Lesson0_1

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

ASP. NET application will provide almost the same functionality, but through 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.

Continue using the wizard to create a solution to begin the tutorial.

Guess you like

Origin www.cnblogs.com/foreachlife/p/Business-Model-Design.html