Orchard command line tool

Source: Internet
Author: User
Orchard provides a command line tool, which can be used to create users, create blogs, and generate Code And configure websites and packaging modules. This command line tool can be expanded as long as we create a command class in the self-developed module and inherit from the defaultorchardcommandhandler provided by the orcahrd framework. In this way, we can implement the commands that our module can provide in this class. For more information, see the usercommands. CS file in the orchard. Users module provided by default.

Start this command line tool to execute the orchard.exe file in the bindirectory of the orchardwebsite. It is under the orchard. web \ bin directory in the project file.

After the command line tool is initially successful, a prompt line "orchard>" appears. Here we can enter some corresponding commands. For example, the help commands provided by the orchard framework.

It lists all available commands. Enter help <command> (Help + the corresponding command will display the help information of the corresponding command). For example, enter help user create, which is shown as follows:

It prompts us how to input the corresponding parameters when using the command to create a user.

The commands provided by default are clearly explained, so it is not a waste of time to introduce them here. As long as you use the help commands command to list them clearly. Here we will focus on the command for automatically generating code templates, which will be useful when developing the orchard module.

If you need to use the autogenerate function of javashard code, you need to install a code generation module first. We can find and install it in the module market of the Management backend of the orchard website. After the installation is complete, enable this module in features. Of course, you can also use the command line tool to enable it, such as orchard> feature enable orchard. codegeneration. When orchard. codegeneration is enabled, you can run the corresponding commands in the orchard command line to create a module. Currently, the following commands can be used:

Codegen controller <module-Name> <controller-Name>

CreateControllerClass

Codegen datamigration <feature-Name>

Create a data file list

Codegen module <module-Name> [/includeinsolution: True | false]

Create a module

Codegen theme <theme-Name> [/createproject: True | false] [/includeinsolution: True | false] [/basedon: <theme-Name>]

Create a skin

Reference:

Http://www.orchardproject.net/docs/Using-the-command-line-interface.ashxhttp://www.orchardproject.net/docs/Command-line-scaffolding.ashx

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.