postgresql.org - Download the installer для БД
NuGet: Npgsql, Dapper
youtube.com - відео
//Налаштування серверу
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;User Id=postgres;" + "Password=postgres;Database=gamestudio;");
// Відкрити з'єднання
conn.Open();
// Запит
NpgsqlCommand cmd = new NpgsqlCommand("SELECT points FROM public.score", conn);
// Виконуємо запит
NpgsqlDataReader dr = cmd.ExecuteReader();
// Прочитати всі рядки і вивести першу колонку
while (dr.Read())
Console.Write("{0}\n", dr[0]);
// Закрити з'єднання
conn.Close();