# SurrealDbDatabaseResource

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.SurrealDb](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb.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.SurrealDb/SurrealDbDatabaseResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<SurrealDbNamespaceResource>`, `IValueProvider`, `IValueWithReferences`

A resource that represents a SurrealDB database that is a child of a SurrealDB namespace resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## ATS metadata

### ATS export

- Type ID: `CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbDatabaseResource`

## Constructors

- [SurrealDbDatabaseResource(string, string, SurrealDbNamespaceResource)](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource/constructors.md#constructor-string-string-surrealdbnamespaceresource) -- Initializes a new instance of the [SurrealDbDatabaseResource](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource.md) class.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the SurrealDB database.
- [DatabaseName](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource/properties.md#databasename) : `string` `get` -- Gets the database name.
- [Parent](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbdatabaseresource/properties.md#parent) : [SurrealDbNamespaceResource](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource.md) `get` -- Gets the parent SurrealDB namespace resource.
