# AzureSqlDatabaseResource Constructors

- Package: [Aspire.Hosting.Azure.Sql](/reference/api/csharp/aspire.hosting.azure.sql.md)
- Type: [AzureSqlDatabaseResource](/reference/api/csharp/aspire.hosting.azure.sql/azuresqldatabaseresource.md)
- Kind: `Constructors`
- Members: `1`

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).

## AzureSqlDatabaseResource(string, string, AzureSqlServerResource)

- Name: `Constructor(string, string, AzureSqlServerResource)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/cbc352350f1a9bafbaff10d14a2c8de4ac186a48/src/Aspire.Hosting.Azure.Sql/AzureSqlDatabaseResource.cs#L21-L42)

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).

```csharp
public class AzureSqlDatabaseResource
{
    public AzureSqlDatabaseResource(
        string name,
        string databaseName,
        AzureSqlServerResource parent)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `databaseName` (`string`)
  The database name.
- `parent` ([AzureSqlServerResource](/reference/api/csharp/aspire.hosting.azure.sql/azuresqlserverresource.md))
  The Azure SQL Database (server) parent resource associated with this database.
