# DocumentDBDatabaseResource

- Kind: `class`
- Package: [Aspire.Hosting.DocumentDB](/reference/api/csharp/aspire.hosting.documentdb.md)
- Version: `0.111.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/azure-databases-aspire/blob/d8d44d4322ce04a98c27e15113a2ecacf12152d8//home/runner/work/azure-databases-aspire/azure-databases-aspire/src/Aspire.Hosting.DocumentDB/DocumentDBDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<DocumentDBServerResource>`, `IValueProvider`, `IValueWithReferences`

A resource that represents a DocumentDB database. This is a child resource of a [DocumentDBServerResource](/reference/api/csharp/aspire.hosting.documentdb/documentdbserverresource.md).

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## Constructors

- [DocumentDBDatabaseResource(string, string, DocumentDBServerResource)](/reference/api/csharp/aspire.hosting.documentdb/documentdbdatabaseresource/constructors.md#constructor-string-string-documentdbserverresource) -- A resource that represents a DocumentDB database. This is a child resource of a [DocumentDBServerResource](/reference/api/csharp/aspire.hosting.documentdb/documentdbserverresource.md).

## Properties

- [ConnectionStringExpression](/reference/api/csharp/aspire.hosting.documentdb/documentdbdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the DocumentDB database.
- [DatabaseName](/reference/api/csharp/aspire.hosting.documentdb/documentdbdatabaseresource/properties.md#databasename) : `string` `get` -- Gets the database name.
- [Parent](/reference/api/csharp/aspire.hosting.documentdb/documentdbdatabaseresource/properties.md#parent) : [DocumentDBServerResource](/reference/api/csharp/aspire.hosting.documentdb/documentdbserverresource.md) `get` -- Gets the parent DocumentDB container resource.
