@@ -53,14 +53,14 @@ public virtual async Task<int> GetCountAsync(
53
53
BlogPostStatus ? statusFilter = null ,
54
54
CancellationToken cancellationToken = default )
55
55
{
56
- List < string > entityIdFilters = null ;
56
+ List < Guid > entityIdFilters = null ;
57
57
if ( tagId . HasValue )
58
58
{
59
- entityIdFilters = await _entityTagManager . GetEntityIdsFilteredByTagAsync ( tagId . Value , CurrentTenant . Id , cancellationToken ) ;
59
+ entityIdFilters = ( await _entityTagManager . GetEntityIdsFilteredByTagAsync ( tagId . Value , CurrentTenant . Id , cancellationToken ) ) . Select ( Guid . Parse ) . ToList ( ) ;
60
60
}
61
61
62
62
var queryable = ( await GetDbSetAsync ( ) )
63
- . WhereIf ( entityIdFilters != null , x => entityIdFilters . Contains ( x . Id . ToString ( ) ) )
63
+ . WhereIf ( entityIdFilters != null , x => entityIdFilters . Contains ( x . Id ) )
64
64
. WhereIf ( blogId . HasValue , x => x . BlogId == blogId )
65
65
. WhereIf ( authorId . HasValue , x => x . AuthorId == authorId )
66
66
. WhereIf ( statusFilter . HasValue , x => x . Status == statusFilter )
@@ -86,14 +86,14 @@ public virtual async Task<List<BlogPost>> GetListAsync(
86
86
var blogPostsDbSet = dbContext . Set < BlogPost > ( ) ;
87
87
var usersDbSet = dbContext . Set < CmsUser > ( ) ;
88
88
89
- List < string > entityIdFilters = null ;
89
+ List < Guid > entityIdFilters = null ;
90
90
if ( tagId . HasValue )
91
91
{
92
- entityIdFilters = await _entityTagManager . GetEntityIdsFilteredByTagAsync ( tagId . Value , CurrentTenant . Id , cancellationToken ) ;
92
+ entityIdFilters = ( await _entityTagManager . GetEntityIdsFilteredByTagAsync ( tagId . Value , CurrentTenant . Id , cancellationToken ) ) . Select ( Guid . Parse ) . ToList ( ) ;
93
93
}
94
94
95
95
var queryable = ( await GetDbSetAsync ( ) )
96
- . WhereIf ( entityIdFilters != null , x => entityIdFilters . Contains ( x . Id . ToString ( ) ) )
96
+ . WhereIf ( entityIdFilters != null , x => entityIdFilters . Contains ( x . Id ) )
97
97
. WhereIf ( blogId . HasValue , x => x . BlogId == blogId )
98
98
. WhereIf ( ! string . IsNullOrWhiteSpace ( filter ) , x => x . Title . Contains ( filter ) || x . Slug . Contains ( filter ) )
99
99
. WhereIf ( authorId . HasValue , x => x . AuthorId == authorId )
0 commit comments