我有一个 LINQ 查询。当我运行查询时,执行操作需要花费大量时间。我怎样才能修改查询以表现良好。这是 LINQ 查询。
询问
var model = (from items in Db.Items
where items.ItemNo == DD.ItemNumber
select new ViewModel()
{
INo = items.ItemNo,
BTags = (from asd in Db.BibContents where asd.BibId == items.BibId && asd.TagNo == "245" && asd.Sfld == "a" select asd.Value).FirstOrDefault(),
Sid = (from stat in Db.ItemStatus1 where stat.Id == items.StatusId select stat.Description).FirstOrDefault(),
Option = DD.Option
}).ToList();