Opening
as described above. after the environment is set up and the environment is set up, we can design the database prototype. The platform provides the relevant database model designer tools to generate the models.
related Code of the script used to create a database table and the entity in the ORM ing section, this allows us to maintain code consistency during the development process, and it will not be difficult to maintain code that is affected by written mistakes or other subjective reasons
.
the database prototype designer provides the following functions:
1. database modeling is saved through XML files. Similar to the powerdesign design idea, it can be provided to different developers for public use.
2. Generate a database tabulation script based on the database model.
3. Generate a database design document through the database model.
4. Use the database model-generate a solution-[only contains the ORM ing entity information of the orm].
5. Generate a database model from an existing data table.
the text may not be intuitive enough, but it is still the old way to look at the picture and talk:
the figure above describes the basic functions of the Database Designer. The following uses the "pharmacy system" to describe how to use the tool.
Database Modeling-pharmacy system
The general functions of the database design tool are provided above. The following describes how to use the tool for database modeling.
1. Run the easeas.develop.ormdesigner.exe application under the “bin”directory.Program:
2. Click the above program and the following screen is displayed:
3. Right-click "entity" in the left-side navigation bar and choose:
4. Create an object first. The following page is displayed. The content area on the right will provide the object information configuration and editing functions:
5. Definitions of Object Data columns:
6. Description of several tabs next to the definition:
7. We can add the definition of the corresponding database column in the form above. After adding the relevant column, click "save ".
8. Select a storage path:
9. The "save" function provided above aims to maintain and edit the model in the following aspects. The saved file is an XML file, as follows:
10. Details about the model file:
A. project configuration information:
B. Other project configurations:
C. Specific object definitions and database table definitions.
Generate corresponding files based on the data model
After we have designed the data model above, we need to generate the "entity", "database table", and "database design document" functions based on the model, next we will introduce how to generate data based on the data model.
These types of files.
1. Generate a "solution" Based on the Data Model ":
First, we need to configure the solution to generate the "Framework" version and other information. Let's first look at how to configure this information.
(1) Configure solution information
Click "parameter settings ":
(2) generate a solution based on the model
A. Click "Tools" in the toolbar ":
B. Select the function "generate code ":
C. Select generate to view the solution file generated in the specified path as follows:
2. Use the "generate script" function of the Database Designer to generate a table creation script.
A. Select the script generation function.
B. Click Generate script to bring up the following dialog box, similar to the previous generation code:
Click Browse and enter the file name and file suffix.
C. Click Generate to output the following file:
D. Execute the script in the file to create the database table.
3. Generate a database design document based on the database model.
A. Select the "output document" functions in the toolbar.
B. Here we have output "RTF" as an example. Click "output document (RTF )"
C. Click Browse and select the file path:
D. view the generated file:
E. The database design document is generated. You can click this file to view the output document format.
Generate a data prototype based on the database table
The above describes how to generate database tables and corresponding entities and database design documents based on data prototypes. Let's take a look at how to generate data models based on database tables. Maybe we already have tables in our project,
We want to generate a data prototype based on the existing table, and then use the data prototype to generate other content.
1. Select the "tool" option in the toolbar:
2. Select the "generate from database" function. The following page is displayed:
3. After Entering the relevant configuration information, click "test link" and the following prompt appears. Then, click "Next":
4. Click Next. The following dialog box is displayed:
5. After a user architecture is selected, the user table under the user architecture is automatically loaded:
6. Click start to generate the following prototype:
In this way, the data prototype is generated based on the database table.
Summary
As we have discussed above, the database prototype designer describes how to design a prototype and how to generate a prototype through an existing database structure to use the features provided by the prototype to generate other files. Next, let's begin
Describes how to perform subsequent development after the corresponding ORM entity layer is generated based on the prototype.
Pharmacy system source code
More communication
Official blog: http://www.smarteas.net/
Http://www.agilelab.cn/
If you have any questions about using the agileeas. NET development platform, use the following contact methods or communication methods.
1. Telephone-Email:
He gozhou: hegezhou_hot@163.com mobile phone: 18691480181 blog: http://www.cnblogs.com/hegezhou_hot/
2. QQ chat group:
308961614 Network Name: h.o. t