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

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

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

            return(db);
        }