Frequently Asked Questions
How do I customise the code generation templates
19/11/2017
|
ForumAdmin Administrator Posts: 3
|
CodeTrigger does not use user-customizable templates. There are lots of template driven code-generators out there, so you can take your pick. Customizing the code generated by CodeTrigger is done either by selecting the various options in your CodeTrigger solution prior to code generation, or by one of the other approaches outlined below.
CODE GENERATION OPTIONS There are dozens of combinations of options for code generation that you can select in the CodeTrigger UI. Some of the options are
Generate Interfaces - Select this option for scenarios when you might need to swap between implementations of certain functions, CodeTrigger will then generate interface definition files for all its classes, and ensure that the classes implement those interfaces.
Repository Pattern - You can select this option to enable the swapping in and out of repository implementations, when using repository pattern.
Dependency Injection and IOC - If using this pattern you can configure CodeTrigger to generate code and attributes to enable the use of common containers such as Unity and Ninject, if required.
Unit of Work pattern - Selecting this option decorates your classes with the relevant attributes and interfaces to enable to construction of a transaction worker for multiple database ops that can be rolled back as a unit. There is built-in support for both the repository and non-repository-pattern use-case.
Database concurrency management - This option generates basic multi-user data-versioning & concurrency management code blocks assuming an 'Optimistic Concurrency' scenario.
Logging support - You can select this option to generate logging callbacks so you can easily add logging for all user actions and capture information all "insert", "update", and "delete" requests with a minimum of effort. This option generates a callback to allows you to provide the implementation or call the third party logger of your choice, eg log4net or Microsoft Enterprise Practices Logging Block.
Exception handling - This option generates exception handling callbacks so you can easily insert your preferred exception handling implementation or call/configure a third party enterprise level exception handling library.
These are just a few of the many options available, for both simple and complex projects, from basic 1-tier database query apps, to multi-tier architectured enterprise level apps. edited by ForumAdmin on 11/19/2017
|
|
0
link
|