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