Provides extension methods and resource definitions for the Aspire AppHost to support running SurrealDB containers.
In your AppHost project, install the Aspire SurrealDB Hosting library with NuGet:
dotnet add package CommunityToolkit.Aspire.Hosting.SurrealDb
Then, in the Program.cs file of AppHost, add a SurrealDB resource and consume the connection using the following methods:
var db = builder.AddSurrealServer("surreal")
.AddNamespace("ns")
.AddDatabase("db");
var myService = builder.AddProject<Projects.MyService>()
.WithReference(db);