REST API for school management, with the following tables created by Code First and with SQLite: Students, Teachers, Pedagogues. Complete CRUD and MVC Pattern, plus Fluent Validation for field validation.
The project was developed as the final project of the first module of the Professionalizing course in Full Stack development.
List of technologies used in the project:
- 1. Packages installation
- 2. Base Class declaration
- 3. Models creation
- 4. Context creation
- 4.1. Dependency injection
- 4.2. Connection String configuration
- 5. Fluent API configuration
- 5.1. Initial data insert
- 6. Migrations perform
- 7. Data Transfer Objects creation
- 8. Interfaces creation
- 8.1. Repositories creation
- 8.2. Controllers creation
- 9. Fluent Validation configuration
- 9.1. Dependency injection
- 10. Database update
- 11. Commit
- Clone the repository:
$ git clone https://github.com/alexandrenolla/API-REST
$ cd API-REST
- Change the path at the Connection String in the appsettings.Development.json file to the path of your local folder:
"ConnectionStrings": {
"LabSchoolContext" : "Data Source=/yourlocalpath/[alexandre]labschoolbd.db;"
}
- Install the following packages by running the commands:
dotnet add package Microsoft.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Tools
dotnet add package Microsoft.EntityFrameworkCore.Design
dotnet add package Microsoft.EntityFrameworkCore.Sqlite
- Run the command:
dotnet run
The API will be available at http://localhost:5127/swagger.