public DAL() { if (this.adapter == null) { this.adapter = new AdapterFactory().createAdapter(Properties.Settings.Default.db_type); } }
public DAL(string db, string Host, string Username, string Password, int port, string Catalog) { if (this.adapter!=null && this.adapter.Db == db && this.adapter.Host == Host && this.adapter.Catalog == Catalog) { return; } this.adapter = new AdapterFactory().createAdapter(db, Host, Username, Password, port, Catalog); }
public DAL(string db) { if (this.adapter!=null && this.adapter.Db == db) return; this.adapter = new AdapterFactory().createAdapter(db); }