public async Task AddNameClaimToScopeIfNotExists(string scope) { var exists = await _securityRepository.Exists <ScopeClaim>(s => s.Name == "name" && s.Scope.Name == scope); if (exists) { Log(true, nameof(ScopeClaim), "name", nameof(Scope), scope); } else { Log(false, nameof(ScopeClaim), "name", nameof(Scope), scope); await _securityRepository.AddScopeClaim(CreateScopeClaim("name"), scope); } }