private void ValidateUser(int organizationId, string userId) { var userExists = _usersDbSet.Any(x => x.Id == userId && x.OrganizationId == organizationId); _kudosServiceValidator.CheckIfUserExists(userExists); }
private async Task ValidateUserAsync(int organizationId, string userId) { var userExists = await _usersDbSet.AnyAsync(x => x.Id == userId && x.OrganizationId == organizationId); _kudosServiceValidator.CheckIfUserExists(userExists); }