|
|
@@ -13,16 +13,9 @@ namespace WebApplicationSample
|
|
|
{
|
|
|
public IConfiguration Configuration { get; }
|
|
|
|
|
|
- public Startup(IHostingEnvironment env)
|
|
|
+ public Startup(IConfiguration configuration)
|
|
|
{
|
|
|
- var builder = new ConfigurationBuilder();
|
|
|
-
|
|
|
- if (env.IsDevelopment()) // 添加用户机密
|
|
|
- {
|
|
|
- builder.AddUserSecrets<Startup>();
|
|
|
- }
|
|
|
-
|
|
|
- Configuration = builder.Build();
|
|
|
+ Configuration = configuration;
|
|
|
}
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|