Modify some comments and fix format

This commit is contained in:
zedy
2023-02-07 14:35:49 +08:00
parent cdc079a20b
commit 69b2dc6d25
2 changed files with 3 additions and 17 deletions

View File

@@ -26,6 +26,7 @@ builder.Logging.AddConsole();
var azdTemplate= builder.Configuration["AZD_TEMPLATE"];
if (azdTemplate == "enable"){
// Configure SQL Server (Azd template)
var credential = new ChainedTokenCredential(new AzureDeveloperCliCredential(), new DefaultAzureCredential());
builder.Configuration.AddAzureKeyVault(new Uri(builder.Configuration["AZURE_KEY_VAULT_ENDPOINT"]), credential);
builder.Services.AddDbContext<CatalogContext>(c =>
@@ -40,24 +41,9 @@ if (azdTemplate == "enable"){
});
}
else{
// Configure SQL Server (Locally)
Microsoft.eShopWeb.Infrastructure.Dependencies.ConfigureServices(builder.Configuration, builder.Services);
}
// Configure SQL Server (Locally)
// Microsoft.eShopWeb.Infrastructure.Dependencies.ConfigureServices(builder.Configuration, builder.Services);
// Configure SQL Server (Azd template)
// var credential = new ChainedTokenCredential(new AzureDeveloperCliCredential(), new DefaultAzureCredential());
// builder.Configuration.AddAzureKeyVault(new Uri(builder.Configuration["AZURE_KEY_VAULT_ENDPOINT"]), credential);
// builder.Services.AddDbContext<CatalogContext>(c =>
// {
// var connectionString = builder.Configuration[builder.Configuration["AZURE_SQL_CATALOG_CONNECTION_STRING_KEY"]];
// c.UseSqlServer(connectionString, sqlOptions => sqlOptions.EnableRetryOnFailure());
// });
// builder.Services.AddDbContext<AppIdentityDbContext>(options =>
// {
// var connectionString = builder.Configuration[builder.Configuration["AZURE_SQL_IDENTITY_CONNECTION_STRING_KEY"]];
// options.UseSqlServer(connectionString, sqlOptions => sqlOptions.EnableRetryOnFailure());
// });
builder.Services.AddCookieSettings();