SurrealDB Docs Logo

Enter a search query

Installation

Before you can use this SDK in your .NET applications regardless of your environment, you need to install and import it into your project. This guide will walk you through the process of installing and importing the SDK into your project.

Install the SDK

  • Create a new project using your favorite IDE (Visual Studio, JetBrains Rider, etc…)
  • or use an existing template from the dotnet new command.

Once ready, add the SurrealDB SDK to your dependencies:

dotnet add package SurrealDb.Net

Alternatively, you can install the SDK via the NuGet user interface provided in your IDE. Here is an example within Visual Studio:

Visual Studio NuGet Package Manager

Initialize the SDK

The SDK’s initialization may vary depending on the context of your project.

The de facto initialization method is to create and consume a SurrealDbClient created manually. Most .NET projects provide a way to configure services using Dependency Injection, which is the recommended way to use the SDK in your application.

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install