关于LINQ的一些问题,速结贴
有一个list
List<int> top3articleid = new List<int>();
top3articleid.Add(1);
top3articleid.Add(2);
top3articleid.Add(3);
@foreach (var article in indexlistitem.Where(p => p.ArticleCategoryID == indexlist.ArticleCategoryID).Where(排除top3articleid 中的ID))
这个地方改怎样写呢,我想排除排除top3articleid 中的那三个数,该怎样写呢
[解决办法]
.Where(s => !top3articleid.Contains(s.ArticleCategoryID))