net8.0net9.0
SurrealDB support for .NET Aspire.
Published
Sep 26, 2025
1y ago
Total Downloads
23.4K
23,392
Install
dotnet add package CommunityToolkit.Aspire.Hosting.SurrealDb --version 9.8.0
| Product | Versions |
|---|---|
| .NET |
README
CommunityToolkit.Aspire.Hosting.SurrealDb library
Provides extension methods and resource definitions for the .NET Aspire AppHost to support running SurrealDB containers.
Getting started
Install the package
In your AppHost project, install the .NET Aspire SurrealDB Hosting library with NuGet:
dotnet add package CommunityToolkit.Aspire.Hosting.SurrealDb
Usage example
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);
Additional Information
https://learn.microsoft.com/dotnet/aspire/community-toolkit/hosting-surrealdb
Feedback & contributing
Changes from Previous Version
No structural changes between v9.8.0-beta.405 and v9.8.0.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 2 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.