示例#1
0
        public static HanFuEntities CreateDbContext()
        {
            HanFuEntities dbContext = (HanFuEntities)CallContext.GetData("dbContext");

            if (dbContext == null)
            {
                dbContext = new HanFuEntities();
                CallContext.SetData("dbContext", dbContext);
            }
            return(dbContext);
        }