2018-12-14 06:58:09 +08:00
|
|
|
The following table details the ASP.NET Core code generator parameters:
|
|
|
|
|
|
|
|
| Parameter | Description|
|
|
|
|
| ----------------- | ------------ |
|
|
|
|
| -m | The name of the model. |
|
|
|
|
| -dc | The data context. |
|
2019-08-15 06:28:13 +08:00
|
|
|
| --relativeFolderPath | The relative output folder path to create the files. |
|
2022-02-08 02:31:42 +08:00
|
|
|
| --useDefaultLayout\|-udl | The default layout should be used for the views. |
|
First-MVC series: Model & DB tutorials: MT, improve readability and fix issues (#22173)
* Rewrite for First MVC series: Adding Model & Working with SQL
* Fixed codegenerator command to include -sqlite for Mac tab
* Troubleshooting merge issue blocking the build.
* Adding no-loc and date back in from main to resolve merge issue
* Adding no-loc and date from main to resolve merge conflict on working-wth-sql.md
* Added new no-loc and date metadata back in after resolving merge
* Trying to resolve no-loc metadata merge conflict, adding at end
* removed Create, Read, Update, Delete, Details from no loc, no way to fix merge conflict
* added old meta data date back in. Can't resolve merge issue
* Setting date back to resolve merge conflict
* fixing dates to fix merge conflict
* Added sqlite to code generator params table.
* formatted DbContext in model4 include
* Apply Rick-Anderson suggestions from code review
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
* Added recommendations by Rick-Andersion to adding-model.md
* Updated no-loc to match update on main for adding-model.md
* Synced meta data with main to avoid merge conflict
* removing changes back to last successful merge and build to resolve merge issue
* Merge troubleshoot: reverting changes past 51c6d30
* Moving all changes to date back in, after troubleshooting merge issue.
* Merge troubleshoot: updating no-loc metadata on sql.md to match what is on main branch
* model.md: moved sections into this order: scaffold the movie, initial mig, Test, Examine
* Adding Rick's suggestions: IDE specific files edited by scaffolding.
* Split up add controller screenshots in adding-model.md
* Added unique alt text to DC screenshots.
* fixed screenshot name dc5_add_dc.png
* Moved note on price field to test the app section.
* Moving words: you were back into instruction per Rick request
* Shortening code lines to under 86 characaters.
* Reducing dc dialog screenshots.
* Changed add mvc controller screenshot per review feedback
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
2021-05-22 22:48:44 +08:00
|
|
|
| --referenceScriptLibraries | Adds `_ValidationScriptsPartial` to Edit and Create pages. |
|
|
|
|
| -sqlite | Flag to specify if `DbContext` should use SQLite instead of SQL Server. |
|
2018-12-14 06:58:09 +08:00
|
|
|
|
|
|
|
Use the `h` switch to get help on the `aspnet-codegenerator controller` command:
|
|
|
|
|
2019-09-18 05:01:04 +08:00
|
|
|
```dotnetcli
|
2018-12-14 06:58:09 +08:00
|
|
|
dotnet aspnet-codegenerator controller -h
|
2019-08-15 05:41:49 +08:00
|
|
|
```
|
|
|
|
|
2019-08-15 06:28:13 +08:00
|
|
|
For more information, see [dotnet aspnet-codegenerator](xref:fundamentals/tools/dotnet-aspnet-codegenerator)
|