public async Task <IdentityResult> DeleteAsync(ApplicationUser user, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); int count = await applicationUserRepository.DeleteAsync(user.Id); if (count > 0) { return(IdentityResult.Success); } return(IdentityResult.Failed(new IdentityError { Description = $"Could not delete user {user.UserName}" })); }
public Task DeleteAsync(ApplicationUser user) { return(_userRepository.DeleteAsync(user)); }