Build a C# application
- installed YugabyteDB, created a universe and are able to interact with it using the CQL shell. If not, please follow these steps in the .
- installed Visual Studio
In your Visual Studio create a new Project and choose Console Application as template. Follow the instructions to save the project.
YugabyteDB has forked the Cassandra driver to add more features like JSONB and change the routing policy.Install the C# driver in your Visual Studio project byfollowing instructions on the page.
Copy the contents below to your Program.cs file.
You should see the following as the output.
This tutorial assumes that you have:
- installed YugabyteDB, created a universe, and are able to interact with it using the YSQL shell. If not, please follow these steps in the ysql guide.
- installed Visual Studio
Install YSQL C# driver
To install the driver in your Visual Studio project:
- Open your Project Solution View.
- Search for Npgsql and click Add Package.
Running the C# application
Run the C# app from menu select Run -> Start Without Debugging