Skip to content

Commit 8e34863

Browse files
authored
fix code snippet (#345)
1 parent 9805311 commit 8e34863

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

conceptual/Npgsql/security.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dataSourceBuilder.UsePeriodicPasswordProvider(
1616
(settings, cancellationToken) => /* async code to fetch the new access token */,
1717
TimeSpan.FromMinutes(55), // Interval for refreshing the token
1818
TimeSpan.FromSeconds(5)); // Interval for retrying after a refresh failure
19-
await using var dataSource = NpgsqlDataSource.Create(connectionString);
19+
await using var dataSource = dataSourceBuilder.Build();
2020
```
2121

2222
This API allows you to provide a minimal async code fragment for fetching the latest auth token, and have Npgsql take care of running it for you as needed.

0 commit comments

Comments
 (0)