##Atention!!! You must need to change the string connection in Web.config file to SQL Server or Startup.cs to inMemory database.
This is a simple CRUD (Create, Read, Update, Delete) API for managing vehicle information, implemented in C# using ASP.NET Core and connected to a SQL Server database. The API allows users to perform operations such as adding new vehicles, retrieving vehicle details, updating existing records, and deleting vehicles from the system.
- C#
- ASP.NET Core
- SQL Server
- RESTful API principles
- Entity Framework
- Endpoint:
/api/veiculos/{id}
or/api/EntityVeiculos/{id}
- Description: Retrieve a list of all vehicles in the system.
- Description: Retrieve detailed information about a specific vehicle using its unique identifier.
- Description: Add a new vehicle to the system.
- Request Body:
{ "marca": "Toyota", "nome": "Camry", "anoModelo": 2022, "dataFabricacao": "2022-02-05T12:00:00", // Use the appropriate date format "valor": 25000.50, "opcionais": "Leather Seats, Sunroof" }
- Description: Update information for a specific vehicle.
- Request Body:
{ "marca": "Chevrolet", "nome": "Astra", "anoModelo": 2010, "dataFabricacao": "2010-04-01T12:00:00", // Use the appropriate date format "valor": 30000.00, "opcionais": "Leather Seats, Sunroof" }
- Description: Delete a specific vehicle from the system.
-
Clone the repository to your local machine:
git clone https://github.com/your-username/vehicle-management-api-csharp.git
-
Open the solution in Visual Studio or your preferred C# IDE.
-
Configure the database connection in the
Web.config
file. -
Build and run the application.
Make sure to set up a SQL Server database and update the connection string in the Web.config
file.
Contributions are welcome! If you'd like to improve the API, add new features, or fix any issues, feel free to submit a pull request.
- Fork the repository.
- Create a new branch:
git checkout -b feature/new-feature
. - Make your changes and commit them:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature/new-feature
. - Submit a pull request.
This project is licensed under the MIT License
If you have any questions or suggestions, feel free to contact me by LinkedIn