我有以下 linq 表达式:
AgentsFilter = new BindableCollection<NameValueGuid>((
from firstEntry in FirstEntries
select new NameValueGuid {
Name = firstEntry.Agent,
Value = firstEntry.AgentId
}).Distinct()
);
但由于某种原因,AgentsFilter 集合中充满了重复项。我怎么了Distinct()
?