예제 #1
0
        public Startup(IHostingEnvironment env)
        {
            var builder = new ConfigurationBuilder()
                          .SetBasePath(env.ContentRootPath)
                          .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
                          .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);

            builder.AddEnvironmentVariables();
            Configuration = builder.Build();
            //初始化映射关系
            FonourMapper.Initialize();
        }
예제 #2
0
 public Startup(IConfiguration configuration)
 {
     Configuration = configuration;
     //初始化映射关系
     FonourMapper.Initialize();
 }