Modify some comments and fix format
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user