首页 > 数据库> > System.InvalidOperationException:“This MySqlConnection is already in use. See https://fl.vu/mysql-co
System.InvalidOperationException:“This MySqlConnection is already in use. See https://fl.vu/mysql-co
作者:互联网
出错
var applicationform = db.ApplicationForm.Where(x => applicationformids.Contains(x.id)); foreach (var item in applicationform) { var supply = realNeedApplyList.Single(x => x.applicationformid == item.id);//这里出错 。。。。。 }
解决办法加.ToList()
var applicationform = db.ApplicationForm.Where(x => applicationformids.Contains(x.id)); foreach (var item in applicationform.ToList()) { var supply = realNeedApplyList.Single(x => x.applicationformid == item.id);//这里出错 。。。。。 }
标签:use,already,reuse,applicationform,supply,item,出错,var,id 来源: https://www.cnblogs.com/lunawzh/p/15173246.html