public RealDB(string dbName, string dbIP,string saPwd ) { DataConfiguration config = new SqlDataConfiguration(dbIP, "sa", saPwd, dbName); this.transactionScopeFactory = new TransactionScopeFactory(config); this.transactionScopeFactory.Initialize(); base.Initialize(this.transactionScopeFactory); }
/// <summary> /// 该构造函数用于SqlServer数据库。 /// </summary> public RealDb(string sqlServerDbName, string dbIp, string saPwd) { DataConfiguration config = new SqlDataConfiguration(dbIp, "sa", saPwd, sqlServerDbName); _transactionScopeFactory = new TransactionScopeFactory(config); _transactionScopeFactory.Initialize(); Initialize(_transactionScopeFactory); }
/// <summary> /// 该构造函数用于SqlServer数据库。 /// </summary> public RealDB(string sqlServerDBName, string dbIP, string saPwd) { DataConfiguration config = new SqlDataConfiguration(dbIP, "sa", saPwd, sqlServerDBName); this.transactionScopeFactory = new TransactionScopeFactory(config); this.transactionScopeFactory.Initialize(); base.Initialize(this.transactionScopeFactory); }
public RealDB(DataBaseType type, string dbName, string dbIP, int dbPort, string dbUser, string dbPwd) { DataConfiguration config = null; if (type == DataBaseType.MySQL) { config = new MysqlDataConfiguration(dbIP, dbPort, dbUser, dbPwd, dbName); } else { config = new SqlDataConfiguration(dbIP, dbUser, dbPwd, dbName, dbPort); } this.transactionScopeFactory = new TransactionScopeFactory(config); this.transactionScopeFactory.Initialize(); base.Initialize(this.transactionScopeFactory); this.GetChatRecordPage(ChatRecordTimeScope.All, "111111", "591821945", 20, 0); }