Skip to content

Commit 177d3fd

Browse files
committed
fix: Fix the Connection String
1 parent 6a5e7da commit 177d3fd

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

BervProject.WebApi.Boilerplate.AppHost/Program.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
.WithHttpEndpoint()
1818
.WithReference(cache, connectionName: "Redis")
1919
.WithReference(postgresdb, connectionName: "BoilerplateConnectionString")
20-
.WithReference(blobs, connectionName: "Azure__Storage__Blob")
21-
.WithReference(queues, connectionName: "Azure__Storage__Queue")
22-
.WithReference(tables, connectionName: "Azure__Storage__Table")
23-
.WithReference(serviceBus, connectionName: "Azure__ServiceBus")
20+
.WithReference(blobs, connectionName: "AzureStorageBlob")
21+
.WithReference(queues, connectionName: "AzureStorageQueue")
22+
.WithReference(tables, connectionName: "AzureStorageTable")
23+
.WithReference(serviceBus, connectionName: "AzureServiceBus")
2424
.WaitFor(cache)
2525
.WaitFor(postgresdb)
2626
.WaitFor(blobs)

BervProject.WebApi.Boilerplate/Extensions/SetupAzureExtension.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public static void SetupAzure(this IServiceCollection services, ConfigurationMan
1515
{
1616
services.AddAzureClients(builder =>
1717
{
18-
builder.AddBlobServiceClient(config.GetConnectionString("Azure__Storage__Blob"));
19-
builder.AddQueueServiceClient(config.GetConnectionString("Azure__Storage__Queue"));
20-
builder.AddServiceBusClient(config.GetConnectionString("Azure__ServiceBus"));
21-
builder.AddTableServiceClient(config.GetConnectionString("Azure__Storage__Table"));
18+
builder.AddBlobServiceClient(config.GetConnectionString("AzureStorageBlob"));
19+
builder.AddQueueServiceClient(config.GetConnectionString("AzureStorageQueue"));
20+
builder.AddServiceBusClient(config.GetConnectionString("AzureServiceBus"));
21+
builder.AddTableServiceClient(config.GetConnectionString("AzureStorageTable"));
2222
});
2323
services.AddScoped<IAzureQueueServices, AzureQueueServices>();
2424
services.AddScoped<ITopicServices, TopicServices>();

BervProject.WebApi.Boilerplate/appsettings.json

+4-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,10 @@
3838
},
3939
"ConnectionStrings": {
4040
"BoilerplateConnectionString": "Host=localhost;Database=testdb;Username=postgres;Password=devpass4444",
41-
"Azure": {
42-
"Storage": {
43-
"Blob": "UseDevelopmentStorage=true",
44-
"Queue": "UseDevelopmentStorage=true",
45-
"Table": "UseDevelopmentStorage=true"
46-
},
47-
"ServiceBus": ""
48-
},
41+
"AzureStorageBlob": "UseDevelopmentStorage=true",
42+
"AzureStorageQueue": "UseDevelopmentStorage=true",
43+
"AzureStorageTable": "UseDevelopmentStorage=true",
44+
"AzureServiceBus": "",
4945
"Redis": "localhost:6379"
5046
}
5147
}

0 commit comments

Comments
 (0)