# SqlServerDatabaseResource

- Kind: `class`
- Package: [Aspire.Hosting.SqlServer](/reference/api/csharp/aspire.hosting.sqlserver.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.SqlServer/SqlServerDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<SqlServerServerResource>`, `IValueProvider`, `IValueWithReferences`

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

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class SqlServerDatabaseResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.ApplicationModel.SqlServerServerResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.SqlServer/SqlServerDatabaseResource`

## Constructors

- [SqlServerDatabaseResource(string, string, SqlServerServerResource)](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/constructors.md#constructor-string-string-sqlserverserverresource) -- A resource that represents a SQL Server database that is a child of a SQL Server container resource.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the SQL Server database.
- [DatabaseName](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/properties.md#databasename) : `string` `get` -- Gets the database name.
- [JdbcConnectionString](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/properties.md#jdbcconnectionstring) : `ReferenceExpression` `get` -- Gets the JDBC connection string for the SQL Server database.
- [Parent](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/properties.md#parent) : [SqlServerServerResource](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverserverresource.md) `get` -- Gets the parent SQL Server container resource.
- [UriExpression](/reference/api/csharp/aspire.hosting.sqlserver/sqlserverdatabaseresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets the connection URI expression for the SQL Server database.
