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