public static IDBSession CreateDBSession(string connKey) { DataAccess.IDatabase db = new DataAccess.Database(connKey); IDBSession dbSession = new DBSessionBase(db); return(dbSession); }
public static IDBSession GetPerHttpRequestDBSession(string connkey = "ConnectionString") { DataAccess.IDatabase db = new DataAccess.Database(connkey); IDBSession dbSession = new DBSessionBase(db); return(dbSession); }
/// <summary> /// 初始化DB信息 /// </summary> private void InitDB() { this.DB = new Database(this._dbTypeDefault, this._connKey); this.DataBaseSession = new DBSessionBase(this.DB); base.SetDBSession(this.DataBaseSession); }