From 720f95a92a39cd2deed9470807570aaed01ac10c Mon Sep 17 00:00:00 2001 From: Arthur Vickers Date: Sun, 15 Jan 2023 13:30:36 +0000 Subject: [PATCH] Update --table and --schema documentation Compliment to https://github.com/dotnet/efcore/pull/30071 --- entity-framework/core/cli/dotnet.md | 28 +++++++++++----------- entity-framework/core/cli/powershell.md | 32 ++++++++++++------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/entity-framework/core/cli/dotnet.md b/entity-framework/core/cli/dotnet.md index 83319446a8..f49772c546 100644 --- a/entity-framework/core/cli/dotnet.md +++ b/entity-framework/core/cli/dotnet.md @@ -211,20 +211,20 @@ Arguments: Options: -| Option | Short | Description | -|:-----------------------------------------------|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `--data-annotations` | `-d` | Use attributes to configure the model (where possible). If this option is omitted, only the fluent API is used. | -| `--context ` | `-c` | The name of the `DbContext` class to generate. | -| `--context-dir ` | | The directory to put the `DbContext` class file in. Paths are relative to the project directory. Namespaces are derived from the folder names. | -| `--context-namespace ` | | The namespace to use for the generated `DbContext` class. Note: overrides `--namespace`. | -| `--force` | `-f` | Overwrite existing files. | -| `--output-dir ` | `-o` | The directory to put entity class files in. Paths are relative to the project directory. | -| `--namespace ` | `-n` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. | -| `--schema ...` | | The schemas of tables to generate entity types for. To specify multiple schemas, repeat `--schema` for each one. If this option is omitted, all schemas are included. | -| `--table ...` | `-t` | The tables to generate entity types for. To specify multiple tables, repeat `-t` or `--table` for each one. If this option is omitted, all tables are included. | -| `--use-database-names` | | Use table and column names exactly as they appear in the database. If this option is omitted, database names are changed to more closely conform to C# name style conventions. | -| `--no-onconfiguring` | | Suppresses generation of the `OnConfiguring` method in the generated `DbContext` class. | -| `--no-pluralize` | | Don't use the pluralizer. | +| Option | Short | Description | +|:-----------------------------------------------|:------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `--data-annotations` | `-d` | Use attributes to configure the model (where possible). If this option is omitted, only the fluent API is used. | +| `--context ` | `-c` | The name of the `DbContext` class to generate. | +| `--context-dir ` | | The directory to put the `DbContext` class file in. Paths are relative to the project directory. Namespaces are derived from the folder names. | +| `--context-namespace ` | | The namespace to use for the generated `DbContext` class. Note: overrides `--namespace`. | +| `--force` | `-f` | Overwrite existing files. | +| `--output-dir ` | `-o` | The directory to put entity class files in. Paths are relative to the project directory. | +| `--namespace ` | `-n` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. | +| `--schema ...` | | The schemas of tables and views to generate entity types for. To specify multiple schemas, repeat `--schema` for each one. If this option is omitted, all schemas are included. If this option is used, then all tables and views in the schemas will be included in the model, even if they are not explicitly included using --table. | +| `--table ...` | `-t` | The tables and views to generate entity types for. To specify multiple tables, repeat `-t` or `--table` for each one. Tables or views in a specific schema can be included using the 'schema.table' or 'schema.view' format. If this option is omitted, all tables and views are included. | +| `--use-database-names` | | Use table, view, sequence, and column names exactly as they appear in the database. If this option is omitted, database names are changed to more closely conform to C# name style conventions. | +| `--no-onconfiguring` | | Suppresses generation of the `OnConfiguring` method in the generated `DbContext` class. | +| `--no-pluralize` | | Don't use the pluralizer. | The [common options](#common-options) are listed above. diff --git a/entity-framework/core/cli/powershell.md b/entity-framework/core/cli/powershell.md index 9cf6f10c61..f2d75eeb1f 100644 --- a/entity-framework/core/cli/powershell.md +++ b/entity-framework/core/cli/powershell.md @@ -213,22 +213,22 @@ Generates code for a `DbContext` and entity types for a database. In order for ` Parameters: -| Parameter | Description | -|:-----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `-Connection ` | The connection string to the database. For ASP.NET Core 2.x projects, the value can be *name=\*. In that case the name comes from the configuration sources that are set up for the project. This is a positional parameter and is required. | -| `-Provider ` | The provider to use. Typically this is the name of the NuGet package, for example: `Microsoft.EntityFrameworkCore.SqlServer`. This is a positional parameter and is required. | -| `-OutputDir ` | The directory to put entity class files in. Paths are relative to the project directory. | -| `-ContextDir ` | The directory to put the `DbContext` file in. Paths are relative to the project directory. | -| `-Namespace ` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. | -| `-ContextNamespace ` | The namespace to use for the generated `DbContext` class. Note: overrides `-Namespace`. | -| `-Context ` | The name of the `DbContext` class to generate. | -| `-Schemas ` | The schemas of tables to generate entity types for. If this parameter is omitted, all schemas are included. | -| `-Tables ` | The tables to generate entity types for. If this parameter is omitted, all tables are included. | -| `-DataAnnotations` | Use attributes to configure the model (where possible). If this parameter is omitted, only the fluent API is used. | -| `-UseDatabaseNames` | Use table and column names exactly as they appear in the database. If this parameter is omitted, database names are changed to more closely conform to C# name style conventions. | -| `-Force` | Overwrite existing files. | -| `-NoOnConfiguring` | Don't generate `DbContext.OnConfiguring`. | -| `-NoPluralize` | Don't use the pluralizer. | +| Parameter | Description | +|:------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `-Connection ` | The connection string to the database. For ASP.NET Core 2.x projects, the value can be *name=\*. In that case the name comes from the configuration sources that are set up for the project. This is a positional parameter and is required. | +| `-Provider ` | The provider to use. Typically this is the name of the NuGet package, for example: `Microsoft.EntityFrameworkCore.SqlServer`. This is a positional parameter and is required. | +| `-OutputDir ` | The directory to put entity class files in. Paths are relative to the project directory. | +| `-ContextDir ` | The directory to put the `DbContext` file in. Paths are relative to the project directory. | +| `-Namespace ` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. | +| `-ContextNamespace ` | The namespace to use for the generated `DbContext` class. Note: overrides `-Namespace`. | +| `-Context ` | The name of the `DbContext` class to generate. | +| `-Schemas ` | The schemas of tables and views to generate entity types for. If this parameter is omitted, all schemas are included. If this option is used, then all tables and views in the schemas will be included in the model, even if they are not explicitly included using -Table. | +| `-Tables ` | The tables and views to generate entity types for. Tables or views in a specific schema can be included using the 'schema.table' or 'schema.view' format. If this parameter is omitted, all tables and views are included. | +| `-DataAnnotations` | Use attributes to configure the model (where possible). If this parameter is omitted, only the fluent API is used. | +| `-UseDatabaseNames` | Use table, view, sequence, and column names exactly as they appear in the database. If this parameter is omitted, database names are changed to more closely conform to C# name style conventions. | +| `-Force` | Overwrite existing files. | +| `-NoOnConfiguring` | Don't generate `DbContext.OnConfiguring`. | +| `-NoPluralize` | Don't use the pluralizer. | The [common parameters](#common-parameters) are listed above.