This project is an API for a trainings management system, developed during a bootcamp at Senai using C# as the main technology.
- C#
- ASP.NET Core 3.1
- Entity Framework Core
- AutoMapper
- JWT Authentication
- Swagger
- Clone the repository
- Open the solution in Visual Studio
- Open the Package Manager Console and run the following command to create the database:
Update-Database
- Run the project in Visual Studio
- Open your browser and go to https://localhost:5001/swagger/index.html to access the Swagger documentation
The API has the following endpoints:
Returns a list of all trainings in the database.
Returns a training by its id.
Creates a new training.
Updates a training by its id.
Deletes a training by its id.
Registers a new user.
Logs in a user and returns a JWT token.
The database used in this project is a Microsoft SQL Server database, created using Entity Framework Core. The database has two tables, called "Trainings" and "Users", which contains the following fields:
- Id (int, primary key)
- Name (nvarchar(50), not null)
- Description (nvarchar(500), not null)
- Date (datetime2, not null)
- Duration (int, not null)
- Id (int, primary key)
- Name (nvarchar(50), not null)
- Email (nvarchar(50), not null)
- Password (nvarchar(100), not null)
- Eduardo Borges Gonçalves - Developer
This project is licensed under the MIT License - see the LICENSE file for details.
Este projeto é uma API para um sistema de gerenciamento de treinamentos, desenvolvido durante um bootcamp no Senai usando C# como principal tecnologia.
- C#
- ASP.NET Core 3.1
- Entity Framework Core
- AutoMapper
- Autenticação JWT
- Swagger
- Clone o repositório
- Abra a solução no Visual Studio
- Abra o Package Manager Console e execute o seguinte comando para criar o banco de dados:
Update-Database
- Execute o projeto no Visual Studio
- Abra o seu navegador e vá para https://localhost:5001/swagger/index.html para acessar a documentação Swagger
A API possui os seguintes endpoints:
Retorna uma lista de todos os treinamentos no banco de dados.
Retorna um treinamento pelo seu id.
Cria um novo treinamento.
Atualiza um treinamento pelo seu id.
Exclui um treinamento pelo seu id.
Registra um novo usuário.
api/users/login
Efetua o login de um usuário e retorna um token JWT.
O banco de dados utilizado neste projeto é um banco de dados Microsoft SQL Server, criado usando o Entity Framework Core. O banco de dados possui duas tabelas, chamadas "Trainings" e "Users", que contêm os seguintes campos:
- Id (int, chave primária)
- Name (nvarchar(50), not null)
- Description (nvarchar(500), not null)
- Date (datetime2, not null)
- Duration (int, not null)
- Id (int, chave primária)
- Name (nvarchar(50), not null)
- Email (nvarchar(50), not null)
- Password (nvarchar(100), not null)
- Eduardo Borges Gonçalves - Desenvolvedor
Este projeto está licenciado sob a Licença MIT - consulte o arquivo LICENSE para obter detalhes.