Skip to content
DocsTry Aspire
DocsTry

SqlServerDatabaseResource Properties

ClassProperties5 members
A resource that represents a SQL Server database that is a child of a SQL Server container resource.
ConnectionStringExpressionSection titled ConnectionStringExpressionReferenceExpression
Gets the connection string expression for the SQL Server database.
public ReferenceExpression ConnectionStringExpression { get; }
DatabaseNameSection titled DatabaseNamestring
Gets the database name.
public string DatabaseName { get; }
JdbcConnectionStringSection titled JdbcConnectionStringReferenceExpression
Gets the JDBC connection string for the SQL Server database.
public ReferenceExpression JdbcConnectionString { get; }

Format: jdbc:sqlserver://{host}:{port};trustServerCertificate=true;databaseName={database}.

User and password credentials are not included in the JDBC connection string. Use the Username and Password connection properties to access credentials.

Gets the parent SQL Server container resource.
public SqlServerServerResource Parent { get; }
UriExpressionSection titled UriExpressionReferenceExpression
Gets the connection URI expression for the SQL Server database.
public ReferenceExpression UriExpression { get; }
Format: mssql://{Username}:{Password}@{Host}:{Port}.