Skip to content
Docs Try Aspire

SqlServerServerResource Properties

Class Properties 9 members
A resource that represents a SQL Server container.
ConnectionStringExpression Section titled ConnectionStringExpression ReferenceExpression
Gets the connection string expression for the SQL Server.
public ReferenceExpression ConnectionStringExpression { get; }
Databases Section titled Databases IReadOnlyDictionary<string, string>
A dictionary where the key is the resource name and the value is the database name.
public IReadOnlyDictionary<string, string> Databases { get; }
Host Section titled Host EndpointReferenceExpression
Gets the host endpoint reference for this resource.
public EndpointReferenceExpression Host { get; }
JdbcConnectionString Section titled JdbcConnectionString ReferenceExpression
Gets the JDBC connection string for the SQL Server.
public ReferenceExpression JdbcConnectionString { get; }

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

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

PasswordParameter Section titled PasswordParameter ParameterResource
Gets the parameter that contains the SQL Server password.
public ParameterResource PasswordParameter { get; }
Port Section titled Port EndpointReferenceExpression
Gets the port endpoint reference for this resource.
public EndpointReferenceExpression Port { get; }
PrimaryEndpoint Section titled PrimaryEndpoint EndpointReference
Gets the primary endpoint for the SQL Server.
public EndpointReference PrimaryEndpoint { get; }
UriExpression Section titled UriExpression ReferenceExpression
Gets the connection URI expression for the SQL Server.
public ReferenceExpression UriExpression { get; }
Format: mssql://{Username}:{Password}@{Host}:{Port}.
UserNameReference Section titled UserNameReference ReferenceExpression
Gets a reference to the user name for the SQL Server.
public ReferenceExpression UserNameReference { get; }
Returns the user name parameter if specified, otherwise returns the default user name "sa".