Skip to content
DocsTry Aspire
DocsTry

SurrealDbServerResource Methods

ClassMethods1 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))
{
// ...
}
}
cancellationTokenCancellationTokenoptionalA 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".