From 9ddd203d3053ca039b285b847d03a61157d7a467 Mon Sep 17 00:00:00 2001 From: lajones Date: Tue, 16 Jun 2020 13:26:29 -0700 Subject: [PATCH] Fix for issues 2422 and 2405. --- entity-framework/core/miscellaneous/cli/dotnet.md | 7 ++++--- entity-framework/core/miscellaneous/cli/powershell.md | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/entity-framework/core/miscellaneous/cli/dotnet.md b/entity-framework/core/miscellaneous/cli/dotnet.md index a356ee2222..10c590fae2 100644 --- a/entity-framework/core/miscellaneous/cli/dotnet.md +++ b/entity-framework/core/miscellaneous/cli/dotnet.md @@ -233,13 +233,14 @@ Options: | `-d` | `--data-annotations` | Use attributes to configure the model (where possible). If this option is omitted, only the fluent API is used. | | `-c` | `--context ` | 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`. | +| | `--context-namespace ` | The namespace to use for the generated `DbContext` class. Note: overrides `--namespace`. (Available from EFCore 5.0.0 onwards.) | | `-f` | `--force` | Overwrite existing files. | | `-o` | `--output-dir ` | The directory to put entity class files in. Paths are relative to the project directory. | -| `-n` | `--namespace ` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. | +| `-n` | `--namespace ` | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. (Available from EFCore 5.0.0 onwards.) | | | `--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. | | `-t` | `--table `... | 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. (Available from EFCore 5.0.0 onwards.) | The following example scaffolds all schemas and tables and puts the new files in the *Models* folder. @@ -268,7 +269,7 @@ Options: | | Option | Description | |:------------------|:-----------------------------------|:-----------------------------------------------------------------------------------------------------------------| | `-o` | `--output-dir ` | The directory use to output the files. Paths are relative to the target project directory. Defaults to "Migrations". | -| `-n` | `--namespace ` | The namespace to use for the generated classes. Defaults to generated from the output directory. | +| `-n` | `--namespace ` | The namespace to use for the generated classes. Defaults to generated from the output directory. (Available from EFCore 5.0.0 onwards.) | ## dotnet ef migrations list diff --git a/entity-framework/core/miscellaneous/cli/powershell.md b/entity-framework/core/miscellaneous/cli/powershell.md index f68ac21df4..c081fbc309 100644 --- a/entity-framework/core/miscellaneous/cli/powershell.md +++ b/entity-framework/core/miscellaneous/cli/powershell.md @@ -147,7 +147,7 @@ Parameters: |:----------------------------------|:------------------------------------------------------------------------------------------------------------------------| | -Name \ | The name of the migration. This is a positional parameter and is required. | | -OutputDir \ | The directory use to output the files. Paths are relative to the target project directory. Defaults to "Migrations". | -| -Namespace \ | The namespace to use for the generated classes. Defaults to generated from the output directory. | +| -Namespace \ | The namespace to use for the generated classes. Defaults to generated from the output directory. (Available from EFCore 5.0.0 onwards.) | ## Drop-Database @@ -185,14 +185,15 @@ Parameters: | -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 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`. | +| -Namespace \ | The namespace to use for all generated classes. Defaults to generated from the root namespace and the output directory. (Available from EFCore 5.0.0 onwards.) | +| -ContextNamespace \ | The namespace to use for the generated `DbContext` class. Note: overrides `-Namespace`. (Available from EFCore 5.0.0 onwards.) | | -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 | Suppresses generation of the `OnConfiguring` method in the generated `DbContext` class. (Available from EFCore 5.0.0 onwards.) | Example: