Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
roji committed Jun 23, 2023
1 parent 43eb811 commit 75929c2
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,22 +248,19 @@ public override void Validate(IDbContextOptions options)
if (ProvideClientCertificatesCallback is not null)
{
throw new InvalidOperationException(
NpgsqlStrings.CannotConfigureWhenDataSourceIsInUse(
"When passing an NpgsqlDataSource to UseNpgsql(), call 'ProvideClientCertificatesCallback' on NpgsqlDataSourceBuilder rather than in UseNpgsql()."));
"When passing an NpgsqlDataSource to UseNpgsql(), call 'ProvideClientCertificatesCallback' on NpgsqlDataSourceBuilder rather than in UseNpgsql().");
}

if (RemoteCertificateValidationCallback is not null)
{
throw new InvalidOperationException(
NpgsqlStrings.CannotConfigureWhenDataSourceIsInUse(
"When passing an NpgsqlDataSource to UseNpgsql(), call 'RemoteCertificateValidationCallback' on NpgsqlDataSourceBuilder rather than in UseNpgsql()."));
"When passing an NpgsqlDataSource to UseNpgsql(), call 'RemoteCertificateValidationCallback' on NpgsqlDataSourceBuilder rather than in UseNpgsql().");
}

if (ProvidePasswordCallback is not null)
{
throw new InvalidOperationException(
NpgsqlStrings.CannotConfigureWhenDataSourceIsInUse(
"When passing an NpgsqlDataSource to UseNpgsql(), 'ProviderPasswordCallback' cannot be used in UseNpgsql(). See https://www.npgsql.org/doc/security.html for configuring passwords and token rotation on NpgsqlDataSourceBuilder."));
"When passing an NpgsqlDataSource to UseNpgsql(), 'ProviderPasswordCallback' cannot be used in UseNpgsql(). See https://www.npgsql.org/doc/security.html for configuring passwords and token rotation on NpgsqlDataSourceBuilder.");
}
}

Expand Down

0 comments on commit 75929c2

Please sign in to comment.