# SurrealDbServerResource Properties

- Package: [CommunityToolkit.Aspire.Hosting.SurrealDb](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb.md)
- Type: [SurrealDbServerResource](/reference/api/csharp/communitytoolkit.aspire.hosting.surrealdb/surrealdbserverresource.md)
- Kind: `Properties`
- Members: `8`

A resource that represents a SurrealDB container.

## ConnectionStringExpression

- Name: `ConnectionStringExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L77-L82)

Gets the connection string expression for the SurrealDB instance.

```csharp
public ReferenceExpression ConnectionStringExpression { get; }
```

## Host

- Name: `Host`
- Modifiers: `get`
- Returns: `EndpointReferenceExpression`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L44)

Gets the host endpoint reference for this resource.

```csharp
public EndpointReferenceExpression Host { get; }
```

## Namespaces

- Name: `Namespaces`
- Modifiers: `get`
- Returns: `IReadOnlyDictionary<string, string>`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L114)

A dictionary where the key is the resource name and the value is the namespace name.

```csharp
public IReadOnlyDictionary<string, string> Namespaces { get; }
```

## PasswordParameter

- Name: `PasswordParameter`
- Modifiers: `get`
- Returns: `ParameterResource`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L64)

Gets the parameter that contains the SurrealDB password.

```csharp
public ParameterResource PasswordParameter { get; }
```

## Port

- Name: `Port`
- Modifiers: `get`
- Returns: `EndpointReferenceExpression`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L49)

Gets the port endpoint reference for this resource.

```csharp
public EndpointReferenceExpression Port { get; }
```

## PrimaryEndpoint

- Name: `PrimaryEndpoint`
- Modifiers: `get`
- Returns: `EndpointReference`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L39)

Gets the primary endpoint for the SurrealDB instance.

```csharp
public EndpointReference PrimaryEndpoint { get; }
```

## UriExpression

- Name: `UriExpression`
- Modifiers: `get`
- Returns: `ReferenceExpression`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L92)

Gets the connection URI expression for the SurrealDB instance.

```csharp
public ReferenceExpression UriExpression { get; }
```

## Remarks

Format: `ws://{host}:{port}/rpc`.

## UserNameParameter

- Name: `UserNameParameter`
- Modifiers: `nullable` `get`
- Returns: `ParameterResource?`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.SurrealDb/SurrealDbServerResource.cs#L54)

Gets the parameter that contains the SurrealDB username.

```csharp
public ParameterResource? UserNameParameter { get; }
```
