public ConfigFields() { DefaultConnectionString = string.Empty; PathSetting = new AppConfigPathSetting(); JWTSetting = new AppConfigJWTSetting(); Key = string.Empty; }
public ConfigFields(IConfiguration config) : this() { DefaultConnectionString = config.GetConnectionString("DefaultConnection"); PathSetting = new AppConfigPathSetting() { ApplicationPath = config.GetValue <string>("PathSetting:ApplicationPath"), LogPath = Path.Combine(config.GetValue <string>("PathSetting:ApplicationPath"), config.GetValue <string>("PathSetting:LogFolder")) }; config.GetSection("JWTSetting").Bind(JWTSetting); Key = config.GetValue <string>("Key"); }