且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

.Distinct()子句不起作用C#MVC

更新时间:2023-08-22 22:14:34

有些实现,例如IEnumerable<obj>.DistinctBy(o => o.Prop),将通过特殊的Property支持.

There are some implementations like IEnumerable<obj>.DistinctBy(o => o.Prop) which will support distinct by a special Property.

以下内容也适用

list.GroupBy(l => l.Property).Select(group => group.First())