我想知道使用LINQ一次可以更新和提交多少条记录是否有限制,我的查询看起来像什么?
var reports = prdb.Reports
.Where(w => w.FileYear == FileYear)
.AsQueryable();
foreach (var r in reports)
{
// update the report teacher name field
var user = syndb.GetUser(r.CreatedBy);
string strTeacherName = user.given + " " + user.Surname;
r.TeacherName = strTeacherName;
}
prdb.SubmitChanges();
该查询可能带回1000条记录,该查询将执行还是崩溃?
慕丝7291255
catspeake
相关分类