PostgreSqlContainer Class
A temporary PostgreSQL container. Obtain one from PostgreSqlContainerDefinition.CreateContainer.
public sealed class PostgreSqlContainer : TemporaryContainer- Inheritance
TemporaryContainerPostgreSqlContainer
Methods
| Name | Description |
|---|---|
| GetConnectionString() | Gets an Npgsql connection string for the running container (on TemporaryContainer.GetHostAddress), using the credentials from the definition's environment variables (POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB). |
GetConnectionString()
PostgreSqlContainer.csGets an Npgsql connection string for the running container (on TemporaryContainer.GetHostAddress), using the credentials from the definition's environment variables (POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB).
public string GetConnectionString()Returns
string The connection string.
Exceptions
InvalidOperationException- The container has not been started.