Skip to content

Commit f02f62b

Browse files
authored
Update --table and --schema documentation (#4210)
1 parent 28e1637 commit f02f62b

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

entity-framework/core/cli/dotnet.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,20 @@ Arguments:
211211

212212
Options:
213213

214-
| Option | Short | Description |
215-
|:-----------------------------------------------|:------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
216-
| <nobr>`--data-annotations`</nobr> | <nobr>`-d`</nobr> | Use attributes to configure the model (where possible). If this option is omitted, only the fluent API is used. |
217-
| <nobr>`--context <NAME>`</nobr> | `-c` | The name of the `DbContext` class to generate. |
218-
| <nobr>`--context-dir <PATH>`</nobr> | | The directory to put the `DbContext` class file in. Paths are relative to the project directory. Namespaces are derived from the folder names. |
219-
| <nobr>`--context-namespace <NAMESPACE>`</nobr> | | The namespace to use for the generated `DbContext` class. Note: overrides `--namespace`. |
220-
| <nobr>`--force`</nobr> | `-f` | Overwrite existing files. |
221-
| <nobr>`--output-dir <PATH>`</nobr> | `-o` | The directory to put entity class files in. Paths are relative to the project directory. |
222-
| <nobr>`--namespace <NAMESPACE>`</nobr> | `-n` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. |
223-
| <nobr>`--schema <SCHEMA_NAME>...`</nobr> | | 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. |
224-
| <nobr>`--table <TABLE_NAME>...`</nobr> | `-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. |
225-
| <nobr>`--use-database-names`</nobr> | | 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. |
226-
| <nobr>`--no-onconfiguring`</nobr> | | Suppresses generation of the `OnConfiguring` method in the generated `DbContext` class. |
227-
| <nobr>`--no-pluralize`</nobr> | | Don't use the pluralizer. |
214+
| Option | Short | Description |
215+
|:-----------------------------------------------|:------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
216+
| <nobr>`--data-annotations`</nobr> | <nobr>`-d`</nobr> | Use attributes to configure the model (where possible). If this option is omitted, only the fluent API is used. |
217+
| <nobr>`--context <NAME>`</nobr> | `-c` | The name of the `DbContext` class to generate. |
218+
| <nobr>`--context-dir <PATH>`</nobr> | | The directory to put the `DbContext` class file in. Paths are relative to the project directory. Namespaces are derived from the folder names. |
219+
| <nobr>`--context-namespace <NAMESPACE>`</nobr> | | The namespace to use for the generated `DbContext` class. Note: overrides `--namespace`. |
220+
| <nobr>`--force`</nobr> | `-f` | Overwrite existing files. |
221+
| <nobr>`--output-dir <PATH>`</nobr> | `-o` | The directory to put entity class files in. Paths are relative to the project directory. |
222+
| <nobr>`--namespace <NAMESPACE>`</nobr> | `-n` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. |
223+
| <nobr>`--schema <SCHEMA_NAME>...`</nobr> | | 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. |
224+
| <nobr>`--table <TABLE_NAME>...`</nobr> | `-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. |
225+
| <nobr>`--use-database-names`</nobr> | | 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. |
226+
| <nobr>`--no-onconfiguring`</nobr> | | Suppresses generation of the `OnConfiguring` method in the generated `DbContext` class. |
227+
| <nobr>`--no-pluralize`</nobr> | | Don't use the pluralizer. |
228228

229229
The [common options](#common-options) are listed above.
230230

entity-framework/core/cli/powershell.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -213,22 +213,22 @@ Generates code for a `DbContext` and entity types for a database. In order for `
213213

214214
Parameters:
215215

216-
| Parameter | Description |
217-
|:-----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
218-
| <nobr>`-Connection <String>`</nobr> | The connection string to the database. For ASP.NET Core 2.x projects, the value can be *name=\<name of connection string>*. 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. |
219-
| <nobr>`-Provider <String>`</nobr> | 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. |
220-
| <nobr>`-OutputDir <String>`</nobr> | The directory to put entity class files in. Paths are relative to the project directory. |
221-
| <nobr>`-ContextDir <String>`</nobr> | The directory to put the `DbContext` file in. Paths are relative to the project directory. |
222-
| <nobr>`-Namespace <String>`</nobr> | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. |
223-
| <nobr>`-ContextNamespace <String>`</nobr> | The namespace to use for the generated `DbContext` class. Note: overrides `-Namespace`. |
224-
| <nobr>`-Context <String>`</nobr> | The name of the `DbContext` class to generate. |
225-
| <nobr>`-Schemas <String[]>`</nobr> | The schemas of tables to generate entity types for. If this parameter is omitted, all schemas are included. |
226-
| <nobr>`-Tables <String[]>`</nobr> | The tables to generate entity types for. If this parameter is omitted, all tables are included. |
227-
| <nobr>`-DataAnnotations`</nobr> | Use attributes to configure the model (where possible). If this parameter is omitted, only the fluent API is used. |
228-
| <nobr>`-UseDatabaseNames`</nobr> | 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. |
229-
| <nobr>`-Force`</nobr> | Overwrite existing files. |
230-
| <nobr>`-NoOnConfiguring`</nobr> | Don't generate `DbContext.OnConfiguring`. |
231-
| <nobr>`-NoPluralize`</nobr> | Don't use the pluralizer. |
216+
| Parameter | Description |
217+
|:------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
218+
| <nobr>`-Connection <String>`</nobr> | The connection string to the database. For ASP.NET Core 2.x projects, the value can be *name=\<name of connection string>*. 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. |
219+
| <nobr>`-Provider <String>`</nobr> | 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. |
220+
| <nobr>`-OutputDir <String>`</nobr> | The directory to put entity class files in. Paths are relative to the project directory. |
221+
| <nobr>`-ContextDir <String>`</nobr> | The directory to put the `DbContext` file in. Paths are relative to the project directory. |
222+
| <nobr>`-Namespace <String>`</nobr> | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. |
223+
| <nobr>`-ContextNamespace <String>`</nobr> | The namespace to use for the generated `DbContext` class. Note: overrides `-Namespace`. |
224+
| <nobr>`-Context <String>`</nobr> | The name of the `DbContext` class to generate. |
225+
| <nobr>`-Schemas <String[]>`</nobr> | 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. |
226+
| <nobr>`-Tables <String[]>`</nobr> | 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. |
227+
| <nobr>`-DataAnnotations`</nobr> | Use attributes to configure the model (where possible). If this parameter is omitted, only the fluent API is used. |
228+
| <nobr>`-UseDatabaseNames`</nobr> | 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. |
229+
| <nobr>`-Force`</nobr> | Overwrite existing files. |
230+
| <nobr>`-NoOnConfiguring`</nobr> | Don't generate `DbContext.OnConfiguring`. |
231+
| <nobr>`-NoPluralize`</nobr> | Don't use the pluralizer. |
232232

233233
The [common parameters](#common-parameters) are listed above.
234234

0 commit comments

Comments
 (0)