With easy code generator you don’t need to write redundant code. Just write and save parts of code in own templates and include them afterwards in other templates. While parsing, easy code generator recognizes include commands, reads the content from the corresponding template and integrates it into the main template.
You can include other templates into your working template under
<Code Snippet Generator> -> <Includes>
In the overview all templates except the one you are currently working with, are listed. Just double click on one or use the button to insert the include command into your current template.
In a data class you don’t only want to have all your properties but also want to add methods to execute SQL commands like SELECT, INSERT, UPDATE and DELETE. For each of these methods you already have written a template and saved them separately:
- dbSelectByPK mit der ID 35
- dbInsert mit der ID 38
- dbUpdate mit der ID 37
- dbDelete mit der ID 39
Instead of copying the content of these templates into your main template and having redundant code, you can simply add include commands:
If you run this template, easy code generator will read all of the 4 sub templates, include their code in the main template and then parse the complete code to one output.