Web Api to manage sales
- .NET 7
- Entity Framework Core
- SQL Server
- Swagger
To run this project, you will need to change the following environment variables in appsettings.json
ConnectionString
Must contain own local connection string
To add and update migration you also need to change in SalesContextFactory.cs
POST api/LogIn/Token
{
"username": "[email protected]",
"password": "MM@11"
}
Parameter | Type | Description |
---|---|---|
username |
string |
Required. The email of employee |
password |
string |
Required. The secrect password |
Then add Bearer to Swagger to use other endpoints
POST api/Order/Create
{
"products": [
1,2
],
"sellerCode": "MM11",
"delivererCode": "MM12"
}
Parameter | Type | Description |
---|---|---|
products |
int[] |
Required. Array of products id |
sellerCode |
string |
Required. The user code of seller |
delivererCode |
string |
Required. The user code of deliverer |
POST api/Order/NextState
{
"orderNumber": "10001"
}
Parameter | Type | Description |
---|---|---|
orderNumber |
string |
Required. The orderNumber returns at order/create |