public async Task <Unit> Handle(DeleteUserCommand request, CancellationToken cancellationToken) { ApplicationUser userToDelete = await _userStorage.FindByIdAsync(request.UserId) .ConfigureAwait(false) ?? throw new NotFoundException(nameof(ApplicationUser), request.UserId); IIdentityResult identityResult = await _userStorage.DeleteAsync(userToDelete) .ConfigureAwait(false); identityResult.ThrowIfFailed(); return(Unit.Value); }