This commit is contained in:
ai.astrakhantsev 2022-11-08 11:33:35 +05:00
parent 8d933199f3
commit 895e49d716

View File

@ -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<RelationUserRoleUserRole> 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)