public Task <IdentityResult> UpdateAsync(ApplicationRole role, CancellationToken cancellationToken) { if (role == null) { throw new ArgumentNullException(nameof(role), "Parameter role is not set to an instance of an object."); } return(_rolesTable.UpdateAsync(role, cancellationToken)); }
public override async Task <IdentityResult> UpdateAsync(IdentityRole <TKey> role, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); role.ThrowIfNull(nameof(role)); role.ConcurrencyStamp = Guid.NewGuid().ToString(); var updated = await RolesTable.UpdateAsync(role, RoleClaims); return(updated ? IdentityResult.Success : IdentityResult.Failed( new IdentityError { Description = $"Role '{role.Name}' could not be updated." } )); }
public Task <IdentityResult> UpdateAsync(ApplicationRole role, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); role.ThrowIfNull(nameof(role)); return(_rolesTable.UpdateAsync(role)); }