Use pgadmin or any other Postgre SQL database admimnistration tool. You can choose any database name, owner and server port you like, just don't forget to check that yur configuration settings from step 2 are correct.
In appsettings.json
file, change the ConnectionStrings
block so that it maches your connection string.
"ConnectionStrings": {
"Postgres": "Host=localhost;Port=5433;Username=postgres;Password=postgres;Database=DutyScheduler"
}
⚠️ Do not change the "Postgres"
key in the specified block, because it is referenced elsewhere in code.
Open up powershell or cmd and cd
into DutyScheduler\DutyScheduler.Service\src\DutyScheduler
directory. From there, run the following commands
dotnet ef migrations add <migration_name>
dotnet ef database update
❗ You'll have to repeat step 3 each time your models change, in order to have those model changes propagated in the database.
When you run the application, docs will be avaliable at http://localhost:5000/swagger/ui/index.html.
Document your API methods with xml comments and the xml docs will be generated and displayed at the specified URL.