Exemplo n.º 1
0
        public IConnection Create(
            string serverType,
            IRepository repository,
            ICommand command,
            string connectionString,
            string schema,
            ITraceWriter traceWriter,
            IAnalyticRecorder analyticRecorder)
        {
            var type       = GetProvider(serverType);
            var provider   = ConstructProvider(type);
            var connection = provider.Open(repository, command, connectionString, schema, traceWriter, analyticRecorder);

            return(connection);
        }
Exemplo n.º 2
0
        public IConnection Open(
            IRepository repository,
            ICommand command,
            string connectionString,
            string schemaName,
            ITraceWriter traceWriter,
            IAnalyticRecorder analyticRecorder)
        {
            _repository  = repository;
            _connection  = new MySqlConnection(connectionString);
            _transaction = null;

            TraceWriter      = traceWriter;
            AnalyticRecorder = analyticRecorder;

            SetCommand(command);

            return(this);
        }
Exemplo n.º 3
0
        public IConnection Open(
            IRepository repository,
            ICommand command,
            string connectionString,
            string schema,
            ITraceWriter traceWriter,
            IAnalyticRecorder analyticRecorder)
        {
            _repository = repository;
            _connection = new NpgsqlConnection(connectionString);

#if DEBUG
            NpgsqlEventLog.Level        = LogLevel.Debug;
            NpgsqlEventLog.EchoMessages = true;
#endif

            _transaction = null;
            _schema      = schema;
            SetCommand(command);
            return(this);
        }