public Task <IdentityResult> UpdateAsync(ApplicationUser user, CancellationToken cancellationToken = default(CancellationToken)) { cancellationToken.ThrowIfCancellationRequested(); user.ThrowIfNull(nameof(user)); user.ConcurrencyStamp = Guid.NewGuid().ToString(); return(_usersTable.UpdateAsync(user)); }
/// <inheritdoc/> public override Task <IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); user.ThrowIfNull(nameof(user)); user.ConcurrencyStamp = Guid.NewGuid().ToString(); return(UsersTable.UpdateAsync(user, UserClaims, UserLogins, UserTokens)); }
/// <inheritdoc/> public override async Task <IdentityResult> UpdateAsync(TUser user, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); user.ThrowIfNull(nameof(user)); user.ConcurrencyStamp = Guid.NewGuid().ToString(); var updated = await UsersTable.UpdateAsync(user, UserClaims, UserRoles, UserLogins, UserTokens); return(updated ? IdentityResult.Success : IdentityResult.Failed(new IdentityError { Code = string.Empty, Description = $"User '{user.UserName}' could not be deleted." })); }