From 73a26aeb8196f044f88c84689835386722b51e3e Mon Sep 17 00:00:00 2001 From: Ivan Gechev Date: Wed, 24 Jan 2024 21:21:57 +0200 Subject: [PATCH] Removed unused sqlpassword variable from code and text (#323) --- .../aspiresqlefcore/AspireSQLEFCore.AppHost/Program.cs | 2 -- docs/database/sql-server-components.md | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/Program.cs b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/Program.cs index 22e8480b8f..b207ba9b9e 100644 --- a/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/Program.cs +++ b/docs/database/snippets/tutorial/aspiresqlefcore/AspireSQLEFCore.AppHost/Program.cs @@ -1,7 +1,5 @@ var builder = DistributedApplication.CreateBuilder(args); -var sqlpassword = builder.Configuration["sqlpassword"]; - var sql = builder.AddSqlServer("sql") .AddDatabase("sqldata"); diff --git a/docs/database/sql-server-components.md b/docs/database/sql-server-components.md index 362c5577f0..42069c0999 100644 --- a/docs/database/sql-server-components.md +++ b/docs/database/sql-server-components.md @@ -98,13 +98,7 @@ Replace the contents of the _Program.cs_ file in the _AspireSQLEFCore.AppHost_ p :::code language="csharp" source="snippets/tutorial/AspireSQLEFCore/AspireSQLEFCore.AppHost/Program.cs"::: -The preceding code adds a SQL Server Container resource to your app and configures a connection to a database called `sqldata`. The Entity Framework classes you configured earlier will automatically use this connection when migrating and connecting to the database. The `sqlpassword` variable represents the password for the default database user in the SQL Server container. - -Set a `sqlpassword` key in the [user secrets](/aspnet/core/security/app-secrets) store of the _AspireSQLEFCore.AppHost_ project using the `dotnet user-secrets` command in the AppHost project directory. Passwords must meet the [Password Policy](/sql/relational-databases/security/password-policy#password-complexity) complexity requirements. - -```dotnetcli -dotnet user-secrets set sqlpassword -``` +The preceding code adds a SQL Server Container resource to your app and configures a connection to a database called `sqldata`. The Entity Framework classes you configured earlier will automatically use this connection when migrating and connecting to the database. ## Run and test the app locally