public GeoRepository( IOptions<FirebirdConnectionOptions> configuration, ILoggerFactory loggerFactory) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } logFactory = loggerFactory; log = loggerFactory.CreateLogger(typeof(GeoRepository).FullName); readConnectionString = configuration.Value.ReadConnectionString; writeConnectionString = configuration.Value.WriteConnectionString; dbGeoCountry = new DBGeoCountry(readConnectionString, writeConnectionString, logFactory); dbGeoZone = new DBGeoZone(readConnectionString, writeConnectionString, logFactory); dbLanguage = new DBLanguage(readConnectionString, writeConnectionString, logFactory); dbCurrency = new DBCurrency(readConnectionString, writeConnectionString, logFactory); }
public GeoRepository( IOptions <FirebirdConnectionOptions> configuration, ILoggerFactory loggerFactory) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); } logFactory = loggerFactory; log = loggerFactory.CreateLogger(typeof(GeoRepository).FullName); readConnectionString = configuration.Options.ReadConnectionString; writeConnectionString = configuration.Options.WriteConnectionString; dbGeoCountry = new DBGeoCountry(readConnectionString, writeConnectionString, logFactory); dbGeoZone = new DBGeoZone(readConnectionString, writeConnectionString, logFactory); dbLanguage = new DBLanguage(readConnectionString, writeConnectionString, logFactory); dbCurrency = new DBCurrency(readConnectionString, writeConnectionString, logFactory); }