diff --git a/AsbCloudInfrastructure/Repository/UserRoleRepository.cs b/AsbCloudInfrastructure/Repository/UserRoleRepository.cs index 61bb1aef..0d9f635f 100644 --- a/AsbCloudInfrastructure/Repository/UserRoleRepository.cs +++ b/AsbCloudInfrastructure/Repository/UserRoleRepository.cs @@ -238,7 +238,7 @@ namespace AsbCloudInfrastructure.Repository await dbContext.RelationUserRolePermissions.AddRangeAsync(newRelations, token); await dbContext.SaveChangesAsync(token); - DropCacheRelationCompanyWell(); + DropCacheRelationUserRolePermissions(); } } @@ -262,11 +262,6 @@ namespace AsbCloudInfrastructure.Repository .Include(r => r.IncludeRole) .Include(r => r.Role) .FromCacheAsync(relationUserRoleUserRoleCacheTag, relationCacheObsolence, token); - private IEnumerable GetCacheRelationUserRoleUserRole() - => dbContext.RelationUserRoleUserRoles - .Include(r => r.IncludeRole) - .Include(r => r.Role) - .FromCache(relationUserRoleUserRoleCacheTag, relationCacheObsolence); private void DropCacheRelationUserRoleUserRole() => dbContext.RelationUserUserRoles.DropCache(relationUserRoleUserRoleCacheTag); @@ -280,7 +275,7 @@ namespace AsbCloudInfrastructure.Repository .Include(r => r.UserRole) .Include(r => r.Permission) .FromCache(relationUserRolePermissionsCacheTag, relationCacheObsolence); - private void DropCacheRelationCompanyWell() + private void DropCacheRelationUserRolePermissions() => dbContext.RelationUserRolePermissions.DropCache(relationUserRolePermissionsCacheTag); private UserRoleDto Convert(UserRole entity)