0
如何删除specefic行我有这样的LINQ到实体:从LINQ结果
var sitesGrpByClientAndFreq = from cfr in clientFullReview2
group cfr by new { cfr.inspectionFreqvency } into g
select new
{
inspectionFreqvency = g.Key.inspectionFreqvency,
siteCount = g.Select(x => x.siteId).ToArray().Distinct().Count(),
normalSitesCount = g.Where(x => x.isNormal == true).Select(x=>x.isNormal).ToArray().Count(),
}
从上面的LINQ我得到这样的结果:
我的问题是如何删除所有行在哪里inspectionFrequency = -1
?
为什么你不使用'where','where inspectionFreqvency!= -1'?看到这一点:https://msdn.microsoft.com/en-us/library/gg509017.aspx#SimpleWhereClause – AsfK
谢谢,我错过了现在,我意识到,这是愚蠢的问题! – Michael