C#
The following projects are recommended for implementing C# applications using the YugabyteDB YSQL API.
| Project | Type | Support | Examples |
|---|---|---|---|
| PostgreSQL Npgsql | C# Driver | Full | Hello World CRUD |
| EntityFramework | ORM | Full | Hello World CRUD |
Learn how to establish a connection to a YugabyteDB database and begin basic CRUD operations using the Hello World examples.
For fully-runnable code snippets and explanations of common operations, see the project page CRUD example. Before running CRUD examples, make sure you have installed the prerequisites.
For reference documentation, including using projects with SSL, refer to the drivers and ORMs reference pages.
Prerequisites
C# development for YugabyteDB has the following prerequisites:
-
.NET SDK
Install .NET SDK 3.1 or later. To download it for your supported OS, visit Download .NET. -
Visual Studio (optional)
For ease-of-use, use an integrated development environment (IDE) such as Visual Studio. To download and install Visual Studio, visit the Visual Studio Downloads page. -
Create a C# project
-
To create a C# project in Visual Studio, select Console Application as template when creating a new project.
-
If you are not using an IDE, use the dotnet command:
dotnet new console -o new_project_name
-
-
YugabyteDB cluster
- Create a free cluster on YugabyteDB Managed. Refer to Create a free cluster. Note that YugabyteDB Managed requires SSL.
- Alternatively, set up a standalone YugabyteDB cluster by following the steps in Install YugabyteDB.