This example API demonstrates a variety of techniques used in designing a maintainable and resilient API.
To set up this API on a development computer:
- Install DotNet 7.0 and Docker Desktop
- Build the API solution
> dotnet build
- Construct the database using Docker (replace the security credentials with your chosen ones)
> docker pull postgres
> docker run -p 5432:5432 --name some-postgres -e POSTGRES_PASSWORD=apipassword -e POSTGRES_USER=apiuser -d postgres
- Execute the database migration script
> dotnet ef database update --project .\ExampleDataLayer\ExampleDataLayer.csproj
- Launch the API
> dotnet run --project .\ExampleApi\ExampleApi.csproj