Skip to content
Sign In

.NET

Installation

In this section, you will learn how to install the .NET SDK in your project.

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.

  • 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

The SDK's initialisation may vary depending on the context of your project.

The de facto initialisation 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.

Was this page helpful?