Before you begin, make sure you meet the following requirements:
- You have installed the ASP .NET Core 5.0 SDK 5.0.405
- You have a <Windows / Linux / Mac> machine. The project was developed on Windows 10
- You have installed SQLServer Express 2016
- Optional SQLServer Management Studio
- Optional Postman
Inside the Gerenciador_de_cursos project folder, follow these steps:
CLI (Windows / Linux):
dotnet restore
dotnet build
dotnet run
Access the link at: https://localhost:50001/api or http://localhost:5000/api
API | Description | Request | Response Body |
---|---|---|---|
GET /api/users/index | Returns all users | None | Array of User |
GET /api/users/show/{id} | Returns a user via id | Guid item | JSON of type User |
POST /api/users/create | Adds a new user | UserCreateDTO item | JSON of type User |
PUT /api/users/update/{id} | Updates a user via id | UserUpdateDTO item | JSON of type User |
DELETE /api/users/delete/{id} | Deletes a user via id | Guid item | JSON of type DeleteResponseDTO |
API | Description | Request | Response Body |
---|---|---|---|
GET /api/courses/index | Returns all courses | None | Array of CourseResponseDTO |
GET /api/courses/show/{id} | Returns a course via Id | Guid item | JSON of type CourseResponseDTO |
POST /api/courses/create | Adds a new course | CourseCreateDTO item | JSON of type CourseResponseDTO |
PUT /api/courses/update/date/{id} | Updates the dates of a course via id | CourseUpdateDTO item | JSON of type CourseResponseDTO |
PATCH /api/courses/update/status/{id} | Updates the status of a course via id | StatusCourseEnum item | JSON of type CourseResponseDTO |
PATCH /api/courses/update/title/{id} | Updates the title of a course via id | Guid item | JSON of type CourseResponseDTO |
DELETE /api/courses/delete/{id} | Deletes a course via id | Guid item | JSON of type DeleteResponseDTO |
StatusCode | Description |
---|---|
200 🟢 | Sucess |
201 🟢 | Created |
400 🟡 | Bad Request |
401 🟡 | Unauthorized |
403 🟡 | Forbidden |
404 🟡 | Not Found |
500 🔴 | Internal Server Error |
Made by me, with love ❤️ :)
Leonardo Oliveira |
This project is under a license. See the MIT file for more details. MIT