[Translation] Orchard documentation-command line basis,
Code generation is an automated task Orchard module for creating additional files and extensions. this function is helpful for developers to create Controllers [Controllers], Data Migration classes [Data Migration], modules [modules], and themes [Theme. however, the Code generation will not be installed by default when installing Orchard.
You can use Orchard Gallery to install the Code generation function. Open the Management Panel and click the Modules option under the Gallery title.
Orchard> feature enable Orchard. CodeGeneration
Enabling features Orchard.CodeGeneration Orchard.CodeGeneration was enabled
Once the code generation function is enabled, some new commands can be used to create a Module [Module] topic [Theme] Data Migration [Data Migration] or Controller [Controller]. now, the code generation Command will add the file to the appropriate location.
codegen controller <module-name> <controller-name> Create a new Orchard controller in a modulecodegen datamigration <feature-name> Create a new Data Migration classcodegen module <module-name> [/IncludeInSolution:true|false] Create a new Orchard modulecodegen theme <theme-name> [/CreateProject:true|false][/IncludeInSolution:true|false][/BasedOn:<theme-name>] Create a new Orchard themecodegen moduletests <module-name> Create a new test for a module
Use the code generation function to create a new module and data migration drill. For details, see Writing a content part.