v10: Remove LegacyDistinctBy (#12326)

* Obsolete LegacyDistinctBy

* Remove usage of LegacyDistinctBy

* Remove LegacyDistinctBy
This commit is contained in:
Ronald Barendse
2022-05-02 10:57:38 +02:00
committed by GitHub
parent 96d33201aa
commit 09731a9168
10 changed files with 91 additions and 146 deletions

View File

@@ -183,7 +183,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
.Where<Member2MemberGroupDto>(x => x.Member == memberId);
return Database.Fetch<NodeDto>(sql)
.LegacyDistinctBy(dto => dto!.NodeId)
.DistinctBy(dto => dto.NodeId)
.Select(x => MemberGroupFactory.BuildEntity(x));
}
@@ -200,7 +200,7 @@ namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement
.Where("cmsMember.LoginName=@loginName", new { loginName = username });
return Database.Fetch<NodeDto>(sql)
.LegacyDistinctBy(dto => dto!.NodeId)
.DistinctBy(dto => dto.NodeId)
.Select(x => MemberGroupFactory.BuildEntity(x));
}