Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Examples/BookingSystem.AspNetCore/Program.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace BookingSystem.AspNetCore
{
Expand All @@ -19,6 +14,11 @@ public static void Main(string[] args)

public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(builder =>
{
var environmentName = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT");
builder.AddJsonFile($"appsettings.{environmentName}.json", false, true);
})
Comment on lines +17 to +21
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out these lines aren't necessary, as it picks up the env specific files automatically

.UseStartup<Startup>();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AppSettings": {
"UsePaymentReconciliationDetailValidation": "true",
"UseSingleSellerMode": "true"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AppSettings": {
"UsePaymentReconciliationDetailValidation": "false",
"UseSingleSellerMode": "false"
}
}
2 changes: 0 additions & 2 deletions Examples/BookingSystem.AspNetCore/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
"AllowedHosts": "*",
"AppSettings": {
"BaseUrl": "https://localhost:5001",
"UseSingleSellerMode": "false",
"UsePaymentReconciliationDetailValidation": "true",
"AccountId": "SN1593",
"PaymentProviderId": "STRIPE"
}
Expand Down