# SurrealDbNamespaceResource

- 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/SurrealDbNamespaceResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<SurrealDbServerResource>`, `IValueProvider`, `IValueWithReferences`

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

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## ATS metadata

### ATS export

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

## Constructors

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

## Properties

- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the SurrealDB database.
- [Databases](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource/properties.md#databases) : `IReadOnlyDictionary<string, string>` `get` -- A dictionary where the key is the resource name and the value is the database name.
- [NamespaceName](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource/properties.md#namespacename) : `string` `get` -- Gets the namespace name.
- [Parent](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbnamespaceresource/properties.md#parent) : [SurrealDbServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbserverresource.md) `get` -- Gets the parent SurrealDB container resource.
