public PersistenceManager(
            IMySqlConnectionWrapper connectionWrapper,
            IMySqlCommandWrapperFactory commandWrapperFactory,
            ILogger logger)
        {
            _logger                = logger;
            _connectionWrapper     = connectionWrapper;
            _commandWrapperFactory = commandWrapperFactory;

            _logger.Information("PersistenceManager: Opening database connection.");
            _connectionWrapper.Open();
            _logger.Information("PersistenceManager: Connection open.");
        }
Example #2
0
        public SecurityDataReader(
            IMySqlConnectionWrapper connectionWrapper,
            IMySqlCommandWrapperFactory commandWrapperFactory,
            ISecurityDataSqlFactory securityDataSqlFactory,
            ILogger logger)
        {
            _logger                 = logger;
            _connectionWrapper      = connectionWrapper;
            _commandWrapperFactory  = commandWrapperFactory;
            _securityDataSqlFactory = securityDataSqlFactory;

            _logger.Information("SecurityDataReader: Opening database connection.");
            _connectionWrapper.Open();
            _logger.Information("SecurityDataReader: Connection open.");
        }