# RavenDBDatabaseResource

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.RavenDB](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<RavenDBServerResource>`, `IValueProvider`, `IValueWithReferences`

A resource that represents a RavenDB database. This is a child resource of a [RavenDBServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource.md).

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## ATS metadata

### ATS export

- Type ID: `CommunityToolkit.Aspire.Hosting.RavenDB/RavenDBDatabaseResource`

## Constructors

- [RavenDBDatabaseResource(string, string, RavenDBServerResource)](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbdatabaseresource/constructors.md#constructor-string-string-ravendbserverresource) -- A resource that represents a RavenDB database. This is a child resource of a [RavenDBServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource.md).

## Properties

- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the RavenDB database, derived from the parent server's connection string.
- [DatabaseName](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbdatabaseresource/properties.md#databasename) : `string` `get` -- Gets the name of the database.
- [Parent](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbdatabaseresource/properties.md#parent) : [RavenDBServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ravendb/ravendbserverresource.md) `get` -- Gets the parent RavenDB server resource associated with this database.
