示例#1
0
        public static SContext Current()
        {
            var db = (SContext)CallContext.GetData("Dbcontext");
            if (db == null)
            {
                db = new SContext();
                CallContext.SetData("Dbcontext", db);
            }

            return db;  
        }
示例#2
0
        public static SContext Current()
        {
            var db = (SContext)CallContext.GetData("Dbcontext");

            if (db == null)
            {
                db = new SContext();
                CallContext.SetData("Dbcontext", db);
            }

            return(db);
        }