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.");
        }
Ejemplo n.º 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.");
        }
 public MySqlCommandWrapper(string commandString, IMySqlConnectionWrapper connectionWrapper)
 {
     _command = new MySqlCommand(commandString, connectionWrapper.DatabaseConnection);
 }
Ejemplo n.º 4
0
 public IMySqlCommandWrapper GetCommandWrapper(string commandString, IMySqlConnectionWrapper connectionWrapper)
 {
     return(new MySqlCommandWrapper(commandString, connectionWrapper));
 }