Пример #1
0
        public DbConnection GetNewConnection()
        {
            var con = factory.CreateConnection();

            con.ConnectionString = this.conStr;
            return(con);
        }
Пример #2
0
        public ReportGenerator()
        {
            var node     = new Uri("http://localhost:9200");
            var settings = new ConnectionSettings(node)
                           .DefaultMappingFor <CustomerLogin>(m => m.IndexName("customer_login"))
                           .DefaultMappingFor <CustomerLogin>(m => m.IdProperty(p => p.Id));

            _elasticClient = new ElasticClient(settings);

            var f = new OracleClientFactory();

            _dbConnection = f.CreateConnection();
            _dbConnection.ConnectionString = "User Id=c##khiem;Password=123456;Data Source=localhost:1521/orcl;Pooling=true";
        }
Пример #3
0
 public OracleDBHelper(string conStr)
 {
     conn = factory.CreateConnection();
     conn.ConnectionString = conStr;
 }