public SiteRepository( IOptions<MySqlConnectionOptionscs> 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(SiteRepository).FullName); readConnectionString = configuration.Value.ReadConnectionString; writeConnectionString = configuration.Value.WriteConnectionString; dbSiteSettings = new DBSiteSettings(readConnectionString, writeConnectionString, logFactory); dbSiteSettingsEx = new DBSiteSettingsEx(readConnectionString, writeConnectionString, logFactory); dbSiteFolder = new DBSiteFolder(readConnectionString, writeConnectionString, logFactory); }
public SiteRepository( IOptions <MySqlConnectionOptionscs> 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(SiteRepository).FullName); readConnectionString = configuration.Value.ReadConnectionString; writeConnectionString = configuration.Value.WriteConnectionString; dbSiteSettings = new DBSiteSettings(readConnectionString, writeConnectionString, logFactory); dbSiteSettingsEx = new DBSiteSettingsEx(readConnectionString, writeConnectionString, logFactory); dbSiteFolder = new DBSiteFolder(readConnectionString, writeConnectionString, logFactory); }