From 20a89391c41d3f61f1858882b1e3cc84388758b0 Mon Sep 17 00:00:00 2001 From: Salih Date: Thu, 13 Jul 2023 15:21:24 +0300 Subject: [PATCH] Update EfCoreTagRepository.cs --- .../Volo/CmsKit/Tags/EfCoreTagRepository.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs index a82fa1113e..c2e5aacd7b 100644 --- a/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs +++ b/modules/cms-kit/src/Volo.CmsKit.EntityFrameworkCore/Volo/CmsKit/Tags/EfCoreTagRepository.cs @@ -88,11 +88,10 @@ public class EfCoreTagRepository : EfCoreRepository return await (from tag in await GetDbSetAsync() join entityTag in (await GetDbContextAsync()).Set() on tag.Id equals entityTag.TagId where tag.EntityType == entityType - select new { tag, entityTag } into tagEntityTag - group tagEntityTag by tagEntityTag.entityTag.TagId + group tag by tag.Id into g orderby g.Count() descending - select new PopularTag(g.Key, g.First().tag.Name, g.Count())) + select new PopularTag(g.Key, g.First().Name, g.Count())) .Take(maxCount) .ToListAsync(cancellationToken: GetCancellationToken(cancellationToken)); }