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; }
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); }
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); }