# SqlServerDatabaseResource Properties

- Package: [Aspire.Hosting.SqlServer](/reference/api/csharp/aspire.hosting.sqlserver.md)
- Type: [SqlServerDatabaseResource](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource.md)
- Kind: `Properties`
- Members: `5`

A resource that represents a SQL Server database that is a child of a SQL Server container resource.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs#L34-L39)

Gets the connection string expression for the SQL Server database.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## DatabaseName

- Name: `DatabaseName`
- Modifiers: `get`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs#L64)

Gets the database name.

```csharp
public string DatabaseName { get; }
```

## JdbcConnectionString

- Name: `JdbcConnectionString`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs#L59)

Gets the JDBC connection string for the SQL Server database.

```csharp
public ReferenceExpression JdbcConnectionString { get; }
```

## Remarks

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.

## Parent

- Name: `Parent`
- Modifiers: `get`
- Returns: [SqlServerServerResource](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverserverresource.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs#L25)

Gets the parent SQL Server container resource.

```csharp
public SqlServerServerResource Parent { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs#L50)

Gets the connection URI expression for the SQL Server database.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: `mssql://{Username}:{Password}@{Host}:{Port}`.
