Skip to content

Commit 9b69fce

Browse files
fix indentation
1 parent 9d68a05 commit 9b69fce

File tree

1 file changed

+37
-37
lines changed

1 file changed

+37
-37
lines changed

articles/azure-app-configuration/quickstart-aspnet-core-app.md

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -76,46 +76,46 @@ dotnet new mvc --no-https --output TestAppConfig
7676
#### [.NET 6.x](#tab/core6x)
7777
In *Program.cs*, and replace its content with the following code:
7878
79-
```csharp
80-
var builder = WebApplication.CreateBuilder(args);
81-
builder.Host.ConfigureAppConfiguration(builder =>
82-
{
83-
builder.AddAzureAppConfiguration(options =>
84-
{
85-
//Connect to your App Config Store using a connection string
86-
options.Connect(Environment.GetEnvironmentVariable("AppConfig"))
87-
// Load all keys that start with `TestApp:` and have no label
88-
.Select("TestApp:*");
89-
});
90-
})
91-
.ConfigureServices(services =>
79+
```csharp
80+
var builder = WebApplication.CreateBuilder(args);
81+
builder.Host.ConfigureAppConfiguration(builder =>
82+
{
83+
builder.AddAzureAppConfiguration(options =>
9284
{
93-
// Make Azure App Configuration services available through dependency injection
94-
services.AddAzureAppConfiguration()
95-
.AddControllersWithViews();
85+
//Connect to your App Config Store using a connection string
86+
options.Connect(Environment.GetEnvironmentVariable("AppConfig"))
87+
// Load all keys that start with `TestApp:` and have no label
88+
.Select("TestApp:*");
9689
});
97-
98-
var app = builder.Build();
99-
100-
// Configure the HTTP request pipeline.
101-
if (!app.Environment.IsDevelopment())
90+
})
91+
.ConfigureServices(services =>
10292
{
103-
app.UseExceptionHandler("/Home/Error");
104-
}
105-
app.UseStaticFiles();
106-
107-
app.UseAzureAppConfiguration();
108-
109-
app.UseRouting();
110-
111-
app.UseAuthorization();
112-
113-
app.MapControllerRoute(
114-
name: "default",
115-
pattern: "{controller=Home}/{action=Index}/{id?}");
116-
117-
app.Run();
118-
```
93+
// Make Azure App Configuration services available through dependency injection
94+
services.AddAzureAppConfiguration()
95+
.AddControllersWithViews();
96+
});
97+
98+
var app = builder.Build();
99+
100+
// Configure the HTTP request pipeline.
101+
if (!app.Environment.IsDevelopment())
102+
{
103+
app.UseExceptionHandler("/Home/Error");
104+
}
105+
app.UseStaticFiles();
106+
107+
app.UseAzureAppConfiguration();
108+
109+
app.UseRouting();
110+
111+
app.UseAuthorization();
112+
113+
app.MapControllerRoute(
114+
name: "default",
115+
pattern: "{controller=Home}/{action=Index}/{id?}");
116+
117+
app.Run();
118+
```
119119
120120
This code will connect to your App Configuration Store using a connection string and load all keys that have the *TestApp* prefix from a previous step.
121121

0 commit comments

Comments
 (0)