Skip to content

furofo/PostGresDevContainersPractice

Repository files navigation

PostgreSQL + Entity Framework Core Example

This C# application connects to your local PostgreSQL postgres_air database using Entity Framework Core.

Setup

  1. Update the password in PostgresAirContext.cs if your database has one:

    "Host=localhost;Port=5432;Database=postgres_air;Username=furofo;Password=YOUR_PASSWORD_HERE"
  2. Restore packages:

    dotnet restore
  3. Run the application:

    dotnet run

What it does

  • Connects to the postgres_air database on localhost:5432
  • Queries data from the postgres_air schema tables:
    • airport
    • aircraft
    • flight
    • passenger
  • Displays sample records from each table

Packages Used

  • Npgsql.EntityFrameworkCore.PostgreSQL - PostgreSQL provider for EF Core
  • Microsoft.EntityFrameworkCore.Design - EF Core design-time tools

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published