SqlServerContainer Class
A temporary SQL Server container. Obtain one from SqlServerContainerDefinition.CreateContainer.
public sealed class SqlServerContainer : TemporaryContainer- Inheritance
TemporaryContainerSqlServerContainer
Methods
| Name | Description |
|---|---|
| GetConnectionString() | Gets a SQL Server connection string for the running container (on TemporaryContainer.GetHostAddress), using credentials from the definition's environment variables (MSSQL_SA_PASSWORD). |
GetConnectionString()
SqlServerContainer.csGets a SQL Server connection string for the running container (on TemporaryContainer.GetHostAddress), using credentials from the definition's environment variables (MSSQL_SA_PASSWORD).
public string GetConnectionString()Returns
string The connection string.
Exceptions
InvalidOperationException- The container has not been started.