Product Task DotNet
Product Task DotNet
Objective: Develop a web API to manage product entries with the following functionalities:
Add Product:
Product Name
Category Name
Sale Price
Color
Quantity
Manufacture Price
Description:
Validation:
Ensure the Product Code is unique in the database. If a duplicate code is entered, return an error
message.
Format the Product Code to always display as 6 digits (e.g., input 1 should be stored as 000001).
Profit Calculation:
Automatically calculate profit for each product using the formula: Profit = Sale Price - Manufacture Price.
Return the calculated profit along with the product details upon successful addition.
Image Handling:
List Products: Endpoint to retrieve a list of all products with optional filtering options. we can search on
any field.
Delete Category: Endpoint to remove a category from the database.(with checks to ensure it's not in use
in product.)