You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-app-configuration/howto-labels-aspnet-core.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -7,13 +7,13 @@ ms.devlang: csharp
7
7
author: maud-lv
8
8
ms.topic: conceptual
9
9
ms.custom: devx-track-csharp
10
-
ms.date: 02/20/2024
10
+
ms.date: 03/19/2025
11
11
ms.author: malev
12
12
13
13
---
14
14
# Use labels to provide per-environment configuration values.
15
15
16
-
Many applications need to use different configurations for different environments. Suppose that an application has a configuration value that defines the connection string to use for its back-end database. The application developers use a different database from the one used in production. The database connection string that the application uses must change as the application moves from development to production.
16
+
Many applications need to use different configurations for different environments. Suppose that an application has a configuration value that defines the endpoint to use for its back-end database. The application developers use a different database from the one used in production. The database endpoint that the application uses must change as the application moves from development to production.
17
17
18
18
In Azure App Configuration, you can use *labels* to define different values for the same key. For example, you can define a single key with different values for development and production. You can specify which label to load when connecting to App Configuration.
19
19
@@ -47,7 +47,7 @@ var builder = WebApplication.CreateBuilder(args);
> The preceding code snippet uses the Secret Manager tool to load App Configuration connection string. For information storing the connection string using the Secret Manager, see [Quickstart for Azure App Configuration with ASP.NET Core](quickstart-aspnet-core-app.md).
59
+
> The preceding code snippet uses the Secret Manager tool to load App Configuration endpoint. For information storing the endpoint using the Secret Manager, see [Quickstart for Azure App Configuration with ASP.NET Core](quickstart-aspnet-core-app.md).
60
60
61
61
The `Select` method is called twice. The first time, it loads configuration values with no label. Then, it loads configuration values with the label corresponding to the current environment. These environment-specific values override any corresponding values with no label. You don't need to define environment-specific values for every key. If a key doesn't have a value with a label corresponding to the current environment, it uses the value with no label.
0 commit comments