示例#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
        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
        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);
        }