Skip to content

megakevin/end-point-blog-dotnet-8-demo

Repository files navigation

This is a demo application for a blog post about developing Web APIs with .NET 8 and ASP.NET Core.

Requires:

  1. .NET 8
  2. dotnet tool install --global dotnet-ef, dotnet tool install --global dotnet-aspnet-codegenerator
  3. PostgreSQL database called vehicle_quotes accessible with username vehicle_quotes and password password.

If Docker is installed. You can create a new PostgreSQL instance with:

docker run -d \
    --name vehicle-quote-postgres \
    -p 5432:5432 \
    --network host \
    -e POSTGRES_DB=vehicle_quotes \
    -e POSTGRES_USER=vehicle_quotes \
    -e POSTGRES_PASSWORD=password \
    postgres

Connect to it with:

docker exec -it vehicle-quote-postgres psql -U vehicle_quotes

or, from the app container

psql -h localhost -U vehicle_quotes

or, if using docker compose

psql -h db -U vehicle_quotes

Build database with: dotnet ef database update

Build with: dotnet build

Run with: dotnet run

About

Demo project for blog posts about .NET 8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages