This project is a simple ASP.NET Core Web API for managing entities.It provides basic CRUD (Create, Read, Update, Delete) operations for entities along with querying capabilities.
The project follows a typical ASP.NET Core Web API structure:
Controllers/
: Contains the controller classes defining API endpoints.Data/
: Includes the database context and entity classes.Models/
: Contains the DTO (Data Transfer Object) classes used for request and response payloads.Program.cs
andStartup.cs
: Entry point and configuration classes for the ASP.NET Core application.appsettings.json
: Configuration file for application settings.
- ASP.NET Core 3.1
- Entity Framework Core
- Swagger/OpenAPI
- C#
To run this project locally, follow these steps:
- Clone this repository to your local machine.
- Open the project in Visual Studio or your preferred IDE.
- Build the solution to restore dependencies.
- Run the project.
Once the project is running locally, you can use tools like Postman or Swagger UI to interact with the API endpoints. Below are the available endpoints:
GET /api/entities
: Retrieve all entities.GET /api/entities/{id}
: Retrieve a specific entity by ID.POST /api/entities
: Add a new entity.PUT /api/entities/{id}
: Update an existing entity by ID.DELETE /api/entities/{id}
: Delete an entity by ID.- Additional endpoints are available for querying entities based on different criteria.