https://github.com/adityaoberai/productapi-techdome
Assignment: Create Product API with Tests
https://github.com/adityaoberai/productapi-techdome
asp-net-web-api dotnet5 ef-core sql-server
Last synced: 4 months ago
JSON representation
Assignment: Create Product API with Tests
- Host: GitHub
- URL: https://github.com/adityaoberai/productapi-techdome
- Owner: adityaoberai
- Created: 2021-05-14T21:24:44.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-16T06:54:26.000Z (about 5 years ago)
- Last Synced: 2025-02-13T08:24:59.132Z (over 1 year ago)
- Topics: asp-net-web-api, dotnet5, ef-core, sql-server
- Language: C#
- Homepage:
- Size: 12.1 MB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProductAPI - Techdome
## Assignment: ProductAPI with Tests
### Prerequisites:
* Need run Migrations for the 3 Database Contexts
```powershell
Add-Migration InitialCreate -Context ProductContext
Add-Migration InitialCreate -Context ProductTypeContext
Add-Migration InitialCreate -Context ProblemDetailsContext
Update-Database -Context ProductContext
Update-Database -Context ProductTypeContext
Update-Database -Context ProblemDetailsContext
```
### Insurance API
POST `/insurance`
* Request Body Example:
```json
{
"ids": [1,1,2,3]
}
```
*Note: The list represents Product IDs from a Shopping Cart*
* Response Example
```json
{
"insurance": 2500
}
```