#EM CONSTRUÇÃO!
This is a simple C# API project for managing Aliens inspired by the popular TV show Ben 10. The project includes several components for managing Aliens, such as adding, editing, and retrieving Alien data.
- This component contains extension methods for mapping between Alien DTOs and the Alien entity.
- Contains Data Transfer Objects (DTOs) for Alien entities, including
AlienGetDTO
andAlienPostDTO
.
- A class for validating Alien post requests using FluentValidation.
- A generic service response class for wrapping API responses with success status, data, and messages.
- Implements the business logic for managing Aliens and interacts with the
AlienService
.
- Handles data operations and interacts with the database using Entity Framework Core. It provides methods for adding, editing, retrieving, and removing Aliens.
- The API's main controller responsible for handling HTTP requests. It exposes endpoints for managing Aliens, including adding, editing, retrieving, and removing them.
- A base class for all entities, containing a unique identifier.
- The Entity Framework Core context for managing the database and interacting with the
Alien
entity.
To use this API, you can follow the instructions in the "Getting Started" section. After setting up the project, you can make HTTP requests to the available endpoints.
To run this API project, you'll need to follow these steps:
- Clone the repository to your local machine.
- Open the solution in Visual Studio or your preferred C# development environment.
- Build the project to restore dependencies and compile the code.
- Configure your database connection in the
appsettings.json
file. - Run database migrations to create the necessary database schema.
- Start the application.
The API provides the following endpoints:
GET /api/aliens
: Retrieve a list of Aliens.GET /api/aliens/{id}
: Retrieve a specific Alien by ID.POST /api/aliens
: Add a new Alien.PUT /api/aliens/{id}
: Edit an existing Alien.DELETE /api/aliens/{id}
: Remove an Alien.
For detailed usage of these endpoints, please refer to the code or API documentation.
If you'd like to contribute to this project, feel free to fork the repository and submit pull requests with your improvements. We welcome contributions to make this project even better!
This project is licensed under the MIT License - see the LICENSE.md file for details.