Convert the database table structure to an entity class (applicable to VB.net and C #. Net)

Source: Internet
Author: User

To facilitate development, you want to convert a database table (View) to an object class chart.

 

If you use EA to directly import the database table, the generated is not a class, or the table structure and the association between the tables (equivalent to the E-R diagram ). For example:

 

 

To convert a database table (View) structure to an object class, two steps are required:

(1) convert the database table (View) structure to the correspondingProgramming LanguageOfCode(This code can be directly imported to the project. You can also edit the code after the EA generates a class diagram, and then import the code to the project)

(2) import the code to the EA to generate a class diagram.

 

STEP (1) with the help of another small software, that is, entityscodegenerate, you can search and download it online.

,

Open Software: set up (very simple)




The generated code file is as follows:


 


Open the relevant project in EA and navigate to the object chart: Right-click to import --vb.net from the source file


 


Locate the generated code file and select all.:



Open to generate the required class diagram (for example ):


 

 

 

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.