public void SetPermission(TKey role, string resource, TKey resourceId, string permission, bool?isEnabled) { _cache.Clear(role, resource, resourceId.ToString(), permission); var resourcetype = _namingConvertor.GetResourceTypeByUniqueName(resource); var convertible = _namingConvertor.GetPermissionByUniqueName(permission); Helpers.CheckIfResourceHasAssignedPermission(resourcetype, convertible); _permissionStore.SetPrivilege(role, resource, resourceId, permission, isEnabled); }