public IDbSessionContext CreateDbSessionContext()
 {
     IDbSessionContext dbSessionContext = (IDbSessionContext)CallContext.GetData(typeof(DbSessionContextFactory).FullName);
     if (dbSessionContext == null)
     {
         dbSessionContext = new DbSessionContext();
         CallContext.SetData(typeof(DbSessionContextFactory).FullName, dbSessionContext);
     }
     return dbSessionContext;
 }
예제 #2
0
        public IDbSessionContext CreateDbSessionContext()
        {
            IDbSessionContext dbSessionContext = (IDbSessionContext)CallContext.GetData(typeof(DbSessionContextFactory).FullName);

            if (dbSessionContext == null)
            {
                dbSessionContext = new DbSessionContext();
                CallContext.SetData(typeof(DbSessionContextFactory).FullName, dbSessionContext);
            }
            return(dbSessionContext);
        }