📜  如何在 c# 代码示例中的 foreach 之后返回要查看的列表

📅  最后修改于: 2022-03-11 14:49:06.810000             🧑  作者: Mango

代码示例1
// Replace DocInfo with the correct type name of the db.docinfo model
var res = new List();

foreach (var i in find)
{
    var entities = db.docinfo.Where(z => z.RequestID == i.BookingID).ToList();
    res.AddRange(entities);
}

return View(res);