This repository contains a simple ASP.NET Core Web API controller for managing vehicles. The controller provides endpoints for retrieving vehicles by color, toggling headlights, deleting cars, and retrieving all vehicles.
- Endpoint:
GET /api/vehicle/cars/{color}
- Description: Retrieves cars of the specified color.
- Parameters:
{color}
: The color of the cars to retrieve.
- Example:
/api/vehicle/cars/red
- Response: Array of car objects.
- ASP.NET Core
- C#
- Microsoft.AspNetCore.Mvc
- Clone the repository.
- Build and run the project.
- Use any API testing tool (e.g., Postman) to access the endpoints described above.
- Make sure you have .NET Core SDK installed.
- Clone this repository.
- Navigate to the project directory.
- Run
dotnet build
to build the project. - Run
dotnet run
to start the API server.
Contributions are welcome. If you find any issues or want to suggest improvements, feel free to open an issue or create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.