The backend of a book rental management system created with .NET, PostgreSQL, Swagger and clean architecture with CQRS.
dotnet watch run
will open up the application on http://localhost:5007/swagger/index.html.
dotnet ef migrations add <MigrationName> -s .\src\BookRentalManager.Api\ -p .\src\BookRentalManager.Infrastructure\ -o Data\Migrations\
.
dotnet ef migrations remove -s .\src\BookRentalManager.Api\ -p .\src\BookRentalManager.Infrastructure\
.
dotnet ef database update -s .\src\BookRentalManager.Api\ -p .\src\BookRentalManager.Infrastructure\
.
After installing PostgreSQL on your machine:
- Windows users:
- Put the directory
C:\Program Files\PostgreSQL\15\bin
in thePATH
variable; - Run
psql -U postgres
and type in the password set up during the PostgreSQL installation; - Run
CREATE ROLE admin WITH CREATEDB LOGIN PASSWORD 'admin';
.
- Put the directory
- Linux users:
- Run
sudo su - postgres
; - Run
psql
; - Run
CREATE ROLE admin WITH CREATEDB LOGIN PASSWORD 'admin';
.
- Run