コード例 #1
0
 public IBLLSession GetBLLSession()
 {
     IBLLSession dbsession = CallContext.GetData(typeof(BLLSessionFactory).Name) as BLLSession;
     if (dbsession == null)
     {
         dbsession = new BLLSession();
         CallContext.SetData(typeof(BLLSessionFactory).Name, dbsession);
     }
     return dbsession;
 }
コード例 #2
0
ファイル: BLLSessionFactory.cs プロジェクト: wpmyj/six
        public IBLLSession GetBLLSesson()
        {
            IBLLSession bllSession = CallContext.GetData(typeof(BLLSessionFactory).Name) as BLLSession;

            if (bllSession == null)
            {
                bllSession = new BLLSession();
                CallContext.SetData(typeof(BLLSessionFactory).Name, bllSession);
            }

            return(bllSession);
        }
コード例 #3
0
ファイル: BLLSessionFactory.cs プロジェクト: jjg0519/NewsCMS
        public IBLLSession GetBLLSession()
        {
            //从当前线程中 获取 DBContext 数据仓储 对象
            IBLLSession iBLLSession = System.Runtime.Remoting.Messaging.CallContext.GetData(typeof(BLLSessionFactory).Name) as IBLLSession;

            if (iBLLSession == null)
            {
                iBLLSession = new BLLSession();
                System.Runtime.Remoting.Messaging.CallContext.SetData(typeof(BLLSessionFactory).Name, iBLLSession);
            }
            return(iBLLSession);
        }