dotnet aspnet-codegenerator view
dotnet aspnet-codegenerator view --help
eg@debian:/media/eg/data/DotnetCliExamples/ExampleSolution/ExampleSolution.Mvc1$ dotnet aspnet-codegenerator view --help
Usage: aspnet-codegenerator [arguments] [options]
Arguments:
generator Name of the generator. Check available generators below.
Options:
-p|--project Path to .csproj file in the project.
-n|--nuget-package-dir
-c|--configuration Configuration for the project (Possible values: Debug/ Release)
-tfm|--target-framework Target Framework to use. (Short folder name of the tfm. eg. net46)
-b|--build-base-path
--no-build
Selected Code Generator: view
Generator Arguments:
viewName : Name of the view
templateName : The view template to use, supported view templates: 'Empty|Create|Edit|Delete|Details|List'
Generator Options:
--model|-m : Model class to use
--dataContext|-dc : DbContext class to use
--referenceScriptLibraries|-scripts : Switch to specify whether to reference script libraries in the generated views
--layout|-l : Custom Layout page to use
--useDefaultLayout|-udl : Switch to specify that default layout should be used for the views
--force|-f : Use this option to overwrite existing files
--relativeFolderPath|-outDir : Specify the relative output folder path from project where the file needs to be generated, if not specified, file will be generated in the project folder
--controllerNamespace|-namespace : Specify the name of the namespace to use for the generated controller
--partialView|-partial : Generate a partial view, other layout options (-l and -udl) are ignored if this is specified
--databaseProvider|-dbProvider : Database provider to use. Options include 'sqlserver' (default), 'sqlite', 'cosmos', 'postgres'.
--useSqLite|-sqlite : Flag to specify if DbContext should use SQLite instead of SQL Server.
RunTime 00:00:00.97
dotnet aspnet-codegenerator view <view_name> <view_template_name> --relativeFolderPath <output_folder_path> --useDefaultLayout
eg@debian:/media/eg/data/DotnetCliExamples/ExampleSolution/ExampleSolution.Mvc1$ dotnet aspnet-codegenerator view Index Empty --relativeFolderPath Views/User --useDefaultLayout
Building project ...
Finding the generator 'view'...
Running the generator 'view'...
Added View : /Views/User/Index.cshtml
RunTime 00:00:03.36
Last updated