LINQ 语句中使用 List<Guid> 进行模糊查询
在 LINQ 语句中,可以使用 'Contains' 方法对 'List
List<Guid> searchGuids = new List<Guid> { guid1, guid2, guid3 }; // 要查询的多个 Guid
var result = from item in yourList
where searchGuids.Contains(item.Id)
select item;
在上述示例中,'searchGuids' 是一个包含多个要查询的 Guid 的 'List
原文地址: https://www.cveoy.top/t/topic/x2a 著作权归作者所有。请勿转载和采集!