# AzureSqlDatabaseResource

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

A resource that represents an Azure SQL database. This is a child resource of an [AzureSqlServerResource](/reference/api/csharp/aspire.hosting.azure.sql/azuresqlserverresource.md).

## Definition

```csharp
namespace Aspire.Hosting.Azure;

public class AzureSqlDatabaseResource
    : 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.Azure.AzureSqlServerResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource`

## Constructors

- [AzureSqlDatabaseResource(string, string, AzureSqlServerResource)](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/constructors.md#constructor-string-string-azuresqlserverresource) -- A resource that represents an Azure SQL database. This is a child resource of an [AzureSqlServerResource](/reference/api/csharp/aspire.hosting.azure.sql/azuresqlserverresource.md).

## Properties

- [Annotations](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#annotations) : `ResourceAnnotationCollection` `get` `ats ignored`
- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Azure SQL database.
- [DatabaseName](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#databasename) : `string` `get` -- Gets the database name.
- [IsContainer](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#iscontainer) : `bool` `get` -- Gets a value indicating whether the current resource represents a container. If so the actual resource is not running in Azure.
- [JdbcConnectionString](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#jdbcconnectionstring) : `ReferenceExpression` `get` -- Gets the JDBC connection string for the Azure SQL database.
- [Parent](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#parent) : [AzureSqlServerResource](/reference/api/csharp/aspire.hosting.azure.sql/azuresqlserverresource.md) `get` -- Gets the parent Azure SQL Database (server) resource.
- [UriExpression](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource/properties.md#uriexpression) : `ReferenceExpression` `get` -- Gets the connection URI expression for the Azure SQL database.
