Skip to content
Docs Try Aspire

SurrealDbServerResource Methods

Class Methods 1 member
A resource that represents a SurrealDB container.
GetConnectionStringAsync(CancellationToken) Section titled GetConnectionStringAsync(CancellationToken) ValueTask<string?>
Gets the connection string for the SurrealDB instance.
public class SurrealDbServerResource
{
public ValueTask<string?> GetConnectionStringAsync(
CancellationToken cancellationToken = default(CancellationToken))
{
// ...
}
}
cancellationToken CancellationToken optional A Threading.CancellationToken to observe while waiting for the task to complete.
ValueTask<string?> A connection string for the SurrealDB instance in the form "Server=scheme://host:port;User=username;Password=password".