An open API service indexing awesome lists of open source software.

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

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
}
```