[Translation] Orchard documentation-command line basis,

Source: Internet
Author: User

[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.




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.