PowerDesigner Create a database model, generate model classes automatically, generate SQL scripts automatically

Source: Internet
Author: User
Tags visibility powerdesigner

One, save the working space

Second, file-new model

Iii. Creating a new database table

Iv. Modifying database table names

V. Setting up a database table field

Vi. Tools->generate object-oriented Model

Open the Details tab, remove the "Check model" and convert the name to encode

Open general, select the language you want to build, apply and confirm

Vii. language->edit Current Object language->profile->attribute->templates->definition

Rewrite the code generation template application confirmation to your own requirements, such as my C # Template:

.if(%isvalidattribute%)///<summary>///[%Name%]///</summary>.if(%comment%)/// <remarks>[%comment%]/// </remarks>. endif.if(%multiple% = =false) and (%isindexer% = =false)[%visibility%][%flags%]%datatype%%code%[=%initialvalue%] {Get;Set; }.Else[%visibility%][%flags%]%datatype%[%arraysize%]%code%[=%initialvalue%] {Get;Set; }. Endif.endif

Viii. language->generate C # code->generated Files

Select the model you want the generated code for

Ix. Database->change Current DBMS

Select the SQL format you want to generate

X. Database--Build database

Confirm the build can

PowerDesigner Create a database model, generate model classes automatically, generate SQL scripts automatically

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.