This repository contains a .NET 8 API built with hexagonal architecture, utilizing PostgreSQL as the database. The project strictly adheres to SOLID principles and is designed for managing ToDo items.
- Hexagonal architecture for modularity and maintainability.
- Swagger for the interface.
- Authorization with login and register.
- PostgreSQL for seamless data storage and retrieval.
- Follows SOLID principles for a scalable and well-structured design.
- ToDo functionality: create, read, update, delete and edit tasks.
-
Clone the repository:
git clone https://github.com/your-username/todo-api.git
-
Navigate to the project directory:
cd Todo-API
-
Build the project:
dotnet build
-
Set up your PostgreSQL database and update the connection string in the configuration.
-
Apply database migrations:
dotnet ef database update
-
Run the API:
dotnet run
Update the database connection string in the appsettings.json file.
- GET /api/todo: Retrieve all ToDo items
- GET /api/todo/{id}: Retrieve a specific ToDo item
- POST /api/todo: Create a new ToDo item
- PUT /api/todo/{id}: Update a ToDo item
- DELETE /api/todo/{id}: Delete a ToDo item