日期:2014-05-20 浏览次数:20841 次
var obj = (from d in db.DEF_Employee
where d.Code == code &&
d.Password == password
select d).SingleOrDefault();
obj.Name = "111";
//这里没有提交到数据库的代码
//然后执行
var obj2 = (from d in db.DEF_Employee
where d.Code == code &&
d.Password == password
select d).SingleOrDefault();
这里的obj2.Name是"111"
var obj = (from d in db.DEF_EmployeeView
where d.Code == code &&
d.Password == password
select d).SingleOrDefault();
obj.Name = "111";
//这里没有提交到数据库的代码
//然后执行
var obj2 = (from d in db.DEF_EmployeeView
where d.Code == code &&