This is a simple e-commerce API built using .NET 8. The API provides CRUD operations for managing products, orders, order details, and customers. It is designed to serve as a mock backend for e-commerce applications.
- Customers: Create, Read, Update, and Delete customer information.
- Products: Manage product details including creation, retrieval, updating, and deletion.
- Orders: Handle order processing with CRUD operations.
- Order Details: Manage details of each order, including product quantities and prices.
- .NET 8
- C#
- Entity Framework Core
- Swagger for API documentation
- .NET 8 SDK
- A code editor (e.g., Visual Studio Code)
-
Clone the repository:
git clone <repository-url> -
Navigate to the project directory:
cd ecommerce-api -
Restore the dependencies:
dotnet restore -
Run the application:
dotnet run
Once the application is running, you can access the Swagger UI for API documentation at:
http://localhost:5000/swagger
The application includes a MockDataInitializer class that seeds the database with mock data for testing purposes. This can be useful for development and testing without needing a real database setup.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.
This project is licensed under the MIT License. See the LICENSE file for more details.