Example #1
0
        public static IDBSession CreateDBSession(string connKey)
        {
            DataAccess.IDatabase db        = new DataAccess.Database(connKey);
            IDBSession           dbSession = new DBSessionBase(db);

            return(dbSession);
        }
Example #2
0
        public static IDBSession GetPerHttpRequestDBSession(string connkey = "ConnectionString")
        {
            DataAccess.IDatabase db        = new DataAccess.Database(connkey);
            IDBSession           dbSession = new DBSessionBase(db);

            return(dbSession);
        }
Example #3
0
 /// <summary>
 /// 初始化DB信息
 /// </summary>
 private void InitDB()
 {
     this.DB = new Database(this._dbTypeDefault, this._connKey);
     this.DataBaseSession = new DBSessionBase(this.DB);
     base.SetDBSession(this.DataBaseSession);
 }