SurrealDb.MinimalApis.Extensions 1.0.0

dotnet add package SurrealDb.MinimalApis.Extensions --version 1.0.0
                    
NuGet\Install-Package SurrealDb.MinimalApis.Extensions -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SurrealDb.MinimalApis.Extensions" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SurrealDb.MinimalApis.Extensions" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="SurrealDb.MinimalApis.Extensions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SurrealDb.MinimalApis.Extensions --version 1.0.0
                    
#r "nuget: SurrealDb.MinimalApis.Extensions, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SurrealDb.MinimalApis.Extensions@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SurrealDb.MinimalApis.Extensions&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=SurrealDb.MinimalApis.Extensions&version=1.0.0
                    
Install as a Cake Tool

SurrealDb.MinimalApis.Extensions

A set of extensions and helpers to use SurrealDB with ASP.NET Core Minimal APIs.

Documentation

View the SDK documentation here.

How to install

dotnet add package SurrealDb.MinimalApis.Extensions
dotnet add package SurrealDb.Net
dotnet add package Microsoft.AspNetCore.OpenApi

Getting started

The MapSurrealEndpoints extension method allows you to map API endpoints for an entity/table.

app
  .MapGroup("/api")
  .MapSurrealEndpoints<WeatherForecast>(
    "/weatherForecast",
    new() { Tags = ["WeatherForecast"], EnableMutations = false }
  )
  .MapSurrealEndpoints<Todo>("/todo", new() { Tags = ["Todo"] });

This method will generate the following API endpoints:

Endpoint Description
GET / Select all records from a SurrealDB table.
GET /{id} Select a single record from a SurrealDB table.
POST / Create a new record in a SurrealDB table.
PUT / Update a record in a SurrealDB table.
PATCH / Patch all records in a SurrealDB table.
PATCH /{id} Patch a single record in a SurrealDB table.
DELETE / Delete all records from a SurrealDB table.
DELETE /{id} Delete a single record from a SurrealDB table.

You can choose to disable some of the API endpoints via the options pattern.

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on SurrealDb.MinimalApis.Extensions:

Repository Stars
CommunityToolkit/Aspire
A community project with additional components and extensions for Aspire
Version Downloads Last Updated
1.0.0 238 7/28/2026
0.10.2 2,062 4/24/2026
0.9.0 10,819 7/25/2025
0.8.0 338 3/28/2025
0.7.0 242 12/12/2024
0.6.0 215 10/21/2024
0.5.1 221 7/12/2024
0.5.0 245 4/4/2024