//httpcontent对象 public static ZhiLianPaiKeXiTongDBEntities CreateDbContext() { ZhiLianPaiKeXiTongDBEntities dbcontex = null; dbcontex = CallContext.GetData("db") as ZhiLianPaiKeXiTongDBEntities; if (dbcontex == null) { dbcontex = new ZhiLianPaiKeXiTongDBEntities(); CallContext.SetData("db", dbcontex); } return(dbcontex); }