public override async Task <IdentityResult> DeleteAsync(ApplicationUser <TKey> user, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); ThrowIfDisposed(); user.ThrowIfNull(nameof(user)); return(await UsersTable.DeleteAsync(user)); }
public Task <IdentityResult> DeleteAsync(ApplicationUser user, CancellationToken cancellationToken) { if (user == null) { throw new ArgumentNullException(nameof(user), "Parameter user is not set to an instance of an object."); } return(_usersTable.DeleteAsync(user, cancellationToken)); }
/// <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.ThrowIfCancellationRequested(); user.ThrowIfNull(nameof(user)); return(_usersTable.DeleteAsync(user)); }