我有以下代码,它停止执行“StackOverFlow 未处理的错误”。
var Requests= GetList();// return List of Request objects
IQueryable<Order> pos= Enumerable.Empty<Order>().AsQueryable();
if (Requests != null)
{
if (Requests.Count > 0)
{
var GeneralReq = Requests.Select(loc => loc.Id).ToList();
pos = db.Order.Where(loc => loc.Deleted == false && GeneralReq.Any(a => a == loc.Id));
//HERE, stop executing with StackOverFlow Error.
}
}
问题就在这里:
pos = db.Order.Where(loc => loc.Deleted == false && GeneralReq.Any(a => a == loc.Id));
一只名叫tom的猫
相关分类