diff --git a/entity-framework/core/cli/dotnet.md b/entity-framework/core/cli/dotnet.md index e30b6e83f3..2bbc5518d0 100644 --- a/entity-framework/core/cli/dotnet.md +++ b/entity-framework/core/cli/dotnet.md @@ -218,8 +218,8 @@ dotnet ef dbcontext scaffold "Server=(localdb)\mssqllocaldb;Database=Blogging;Tr The following example reads the connection string from the project's configuration set using the [Secret Manager tool](/aspnet/core/security/app-secrets#secret-manager). ```dotnetcli -dotnet user-secrets set ConnectionStrings.Blogging "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Blogging" -dotnet ef dbcontext scaffold Name=ConnectionStrings.Blogging Microsoft.EntityFrameworkCore.SqlServer +dotnet user-secrets set ConnectionStrings:Blogging "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Blogging" +dotnet ef dbcontext scaffold Name=ConnectionStrings:Blogging Microsoft.EntityFrameworkCore.SqlServer ``` ## dotnet ef dbcontext script diff --git a/entity-framework/core/cli/powershell.md b/entity-framework/core/cli/powershell.md index f6c73ce8fa..e9412d5efe 100644 --- a/entity-framework/core/cli/powershell.md +++ b/entity-framework/core/cli/powershell.md @@ -206,7 +206,7 @@ Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Conn The following example reads the connection string from the project's configuration possibly set using the [Secret Manager tool](/aspnet/core/security/app-secrets#secret-manager). ```powershell -Scaffold-DbContext "Name=ConnectionStrings.Blogging" Microsoft.EntityFrameworkCore.SqlServer +Scaffold-DbContext "Name=ConnectionStrings:Blogging" Microsoft.EntityFrameworkCore.SqlServer ``` ## Script-DbContext diff --git a/entity-framework/core/managing-schemas/scaffolding.md b/entity-framework/core/managing-schemas/scaffolding.md index 1c1465f50a..4d217cf84d 100644 --- a/entity-framework/core/managing-schemas/scaffolding.md +++ b/entity-framework/core/managing-schemas/scaffolding.md @@ -42,8 +42,8 @@ If you have an ASP.NET Core project, you can use the `Name=` This works well with the [Secret Manager tool](/aspnet/core/security/app-secrets#secret-manager) to keep your database password separate from your codebase. ```dotnetcli -dotnet user-secrets set ConnectionStrings.Chinook "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Chinook" -dotnet ef dbcontext scaffold Name=ConnectionStrings.Chinook Microsoft.EntityFrameworkCore.SqlServer +dotnet user-secrets set ConnectionStrings:Chinook "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Chinook" +dotnet ef dbcontext scaffold Name=ConnectionStrings:Chinook Microsoft.EntityFrameworkCore.SqlServer ``` ## Provider name diff --git a/entity-framework/core/miscellaneous/connection-strings.md b/entity-framework/core/miscellaneous/connection-strings.md index 77cceb6573..ba3004cde9 100644 --- a/entity-framework/core/miscellaneous/connection-strings.md +++ b/entity-framework/core/miscellaneous/connection-strings.md @@ -16,8 +16,8 @@ In ASP.NET Core the configuration system is very flexible, and the connection st For instance, you can use the [Secret Manager tool](/aspnet/core/security/app-secrets#secret-manager) to store your database password and then, in scaffolding, use a connection string that simply consists of `Name=`. ```dotnetcli -dotnet user-secrets set ConnectionStrings.YourDatabaseAlias "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=YourDatabase" -dotnet ef dbcontext scaffold Name=ConnectionStrings.YourDatabaseAlias Microsoft.EntityFrameworkCore.SqlServer +dotnet user-secrets set ConnectionStrings:YourDatabaseAlias "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=YourDatabase" +dotnet ef dbcontext scaffold Name=ConnectionStrings:YourDatabaseAlias Microsoft.EntityFrameworkCore.SqlServer ``` Or the following example shows the connection string stored in `appsettings.json`.