我想知道我是否可以在下面使用数组而不是编写多个 OR
from d in db.tblEquipments.Include(t => t.User).Include(t => t.ChangeLog).AsEnumerable()
where (d.AssetType == "Laptop" || d.AssetType == "Workstation" || d.AssetType == "Mobile" d.AssetType == "Monitor" d.AssetType == "Other Peripheral" || d.AssetType == "Home Printer" || d.AssetType == "Home Router" || d.AssetType == "Removable Device")
(d.Active == 1) &&
(d.Deleted != 1 || d.Deleted == null) &&
像下面这样的东西?
string[] arrItems = new string[] { "Laptop", "Workstation", "Mobile" }; etc
where (d.assetType == arrItems) &&
(d.Active == 1) && ....
那可能吗?