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(); }
public Startup(IConfiguration configuration) { Configuration = configuration; //初始化映射关系 FonourMapper.Initialize(); }