日期:2014-05-20 浏览次数:20967 次
if(mymember.isuser(uid)) { DBnameEntities db; db = new DBnameEntities(); var objA = db.A.Where(t => t.uid == uid).FirstOrDefault(); ... db.SaveChanges(); db = new DBnameEntities(); var objB = db.B.Where(t => t.uid == uid).FirstOrDefault(); ... db.SaveChanges(); db = new DBnameEntities(); var objC = db.C.Where(t => t.uid == uid).FirstOrDefault(); ... db.SaveChanges(); db = new DBnameEntities(); var objD = db.D.Where(t => t.uid == uid).FirstOrDefault(); ... db.SaveChanges(); } ......... 数据插入也差不多做法,这里省