Ejemplo n.º 1
0
        public GeoRepository(
            SqliteConnectionstringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (connectionStringResolver == null) { throw new ArgumentNullException(nameof(connectionStringResolver)); }
            if (loggerFactory == null) { throw new ArgumentNullException(nameof(loggerFactory)); }

            logFactory = loggerFactory;
            log = loggerFactory.CreateLogger(typeof(GeoRepository).FullName);
            connectionString = connectionStringResolver.Resolve();

            dbGeoCountry = new DBGeoCountry(connectionString, logFactory);
            dbGeoZone = new DBGeoZone(connectionString, logFactory);
            dbLanguage = new DBLanguage(connectionString, logFactory);
            dbCurrency = new DBCurrency(connectionString, logFactory);
        }
Ejemplo n.º 2
0
        public GeoRepository(
            SqliteConnectionstringResolver connectionStringResolver,
            ILoggerFactory loggerFactory)
        {
            if (connectionStringResolver == null)
            {
                throw new ArgumentNullException(nameof(connectionStringResolver));
            }
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            logFactory       = loggerFactory;
            log              = loggerFactory.CreateLogger(typeof(GeoRepository).FullName);
            connectionString = connectionStringResolver.Resolve();

            dbGeoCountry = new DBGeoCountry(connectionString, logFactory);
            dbGeoZone    = new DBGeoZone(connectionString, logFactory);
            dbLanguage   = new DBLanguage(connectionString, logFactory);
            dbCurrency   = new DBCurrency(connectionString, logFactory);
        }