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 f22da7bce7..3949ec61a4 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 @@ -96,8 +96,8 @@ namespace Volo.CmsKit.Tags .WhereIf( !filter.IsNullOrEmpty(), x => - x.Name.ToLower().Contains(filter) || - x.EntityType.ToLower().Contains(filter)); + x.Name.ToLower().Contains(filter.ToLower()) || + x.EntityType.ToLower().Contains(filter.ToLower())); } } } diff --git a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs index 18cc12df68..97034f9f21 100644 --- a/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs +++ b/modules/cms-kit/test/Volo.CmsKit.TestBase/Tags/TagRepository_Test.cs @@ -112,5 +112,22 @@ namespace Volo.CmsKit.Tags tags.Count.ShouldBe(0); } + + [Fact] + public async Task Should_GetList_With_Filter() + { + var tags = await _tagRepository.GetListAsync(_cmsKitTestData.TagName_1); + + tags.ShouldNotBeNull(); + tags.Count.ShouldBe(1); + } + + [Fact] + public async Task Should_GetCount_With_Filter() + { + var count = await _tagRepository.GetCountAsync(_cmsKitTestData.TagName_1); + + count.ShouldBe(1); + } } } \ No newline at end of file