public LogRepository( IOptions<FirebirdConnectionOptions> configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } readConnectionString = configuration.Value.ReadConnectionString; writeConnectionString = configuration.Value.WriteConnectionString; dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString); }
public LogRepository( 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; dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString, logFactory); }
public LogRepository( 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; dbSystemLog = new DBSystemLog(readConnectionString, writeConnectionString, logFactory); }