Introduction to template functions of dynamic software code generator

Source: Internet
Author: User

The template code generation function has been integrated into the dynamic software code generator, but some old users do not know this function or new users do not know it too well. Let's take a look at this function briefly, custom Users and advanced users can generate their own code more flexibly and conveniently.

1. Main Interface:

 

2. In the left-side [database view], select a table and right-click the table and choose [template code generation]

 

3. Then, the Code Generator interface for a single table is displayed. Let's set the information we need to change.

 

Note: The Code also has some generation rules, which are set in the menu "Tools"-"options"-"code generation settings.

 

Then, click Generate code or generate code in the toolbar to generate the code of this class:

The generated code can be copied directly to the project file or saved as a CS file by right-clicking. You can switch the design view and code back and forth through the tab button under the form.

 

 

4. You can set the template directory.

 

5. Generate template code in batches

1. Select the database or table, right-click the menu, and choose "batch generate template code]

2. The displayed window is similar to the new project, but the selected architecture option is added:

 

 

6. You can also select a stored procedure to generate the Dal call code for the stored procedure:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

7. template example

The template syntax is very similar to the aspx syntax. It is basically a C # syntax structure and can be written as long as C # is used.

 

 

 

More detailed template syntax tutorial, you can download the tutorial documentation: http://files.cnblogs.com/ltp/Template.pdf

 

Related Article

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.