【发布时间】:2017-07-02 17:36:38
【问题描述】:
我已经定义了两个列表,现在想通过匹配filterRIDS RID 值的Application 属性过滤escHistory 列表。
但是通过过滤掉escHistory 的LINQ,我得到的返回计数为零。尽管该列表确实包含应用程序属性值与filterRIDS 中定义的值匹配的记录。
问题:
如何在另一个列表中按属性值过滤列表?
这是过滤器代码的基本要点:
List<int> filterRIDS = new List<int> { 115841, 200463 };
List<Escalation> escHistory = new List<Escalation>();
//Filter list by RID's matching
escHistory = escHistory.Where(r => r.Application.Contains(filterRIDS.ToString())).ToList<Escalation>();
【问题讨论】: