diff --git a/src/EventHub.Application/Events/EventAppService.cs b/src/EventHub.Application/Events/EventAppService.cs index 014c1bb..18811a5 100644 --- a/src/EventHub.Application/Events/EventAppService.cs +++ b/src/EventHub.Application/Events/EventAppService.cs @@ -439,8 +439,8 @@ namespace EventHub.Events { foreach (var userName in speakerUserNames) { - var user = await _userRepository.FindAsync(x => x.UserName == userName.Trim()); - if (user is null) + var user = await _userRepository.AnyAsync(x => x.UserName == userName.Trim()); + if (!user) { throw new BusinessException(EventHubErrorCodes.UserNotFound) .WithData("UserName", userName);