Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NpgsqlDemo

This project shows how to use Ngpsql to connect a C# console app to the Pagila database.

  • Fork this repo on GitHub.

  • Go to Visual Studio to clone your forked repo.

    • Git menu -> Clone Repository
    • Under Browse Repositories, click the GitHub button.
    • Select your NgpsqlDemo repo and click Clone.
  • Go to Solution Explorer in Visual Studio

    • Right-click NpgsqlDemo
      • Select Manage Nuget Packages
      • Browse
        • Search for Microsoft.Extensions.Configuration
          • Install
        • Search for Microsoft.Extensions.Configuration.Json
          • Install
        • Search for Npgsql
          • Install
    • Right-click NpgsqlDemo
      • Add -> New Item
      • Name the file appsettings.json
  • Paste this code in appsettings.json:

{
  "ConnectionStrings": {
    "Pagila": "Host=YOURSERVERNAME;Port=5432;Database=pagila;Username=YOURUSERNAME;Password=YOURPASSWORD"
  }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages