Report Bug |
Request Feature
My test task, I tried to keep within the minimum of the code, and to make it easy to read, enjoy
Tech. Stack:
ASP .NET Core, PostgreSQL,
- Change the connection string inside appsettings.json (I'm sorry, I could not build a docker-compose file for simplified launch of the database and application, due to problems with Windows, I can fix it if necessary)
Update-Database
run EF Core migrations- I was not sure that pre-filling is necessary here, so I just put the TestData.sql file with some data
docker-compose up -d
- Start APS NET Core application
Response example:
{
"id": 2,
"description": "Like Drink",
"surveyId": 1,
"answers": [
{
"id": 3,
"value": "Sprite",
"questionId": 2
},
{
"id": 4,
"value": "Water",
"questionId": 2
}
]
}
Receive body:
{
"answerId": 0,
"questionId": 0,
"userId": 0
}
Response:
{
"id": 2,
"isEnd": false
}