trainingdays
trainingdays copied to clipboard
Day 3 - Breakout 01 - Contacts API uses local database
In the Breakout 01 of day 3, the contacts API does not seem to use the configured connection string to the SQL database. Instead it uses an in memory database. This can be tested by:
- Adding a contact with the frontend
- Retrieving the contact with the contact api
GET /contacts
returns the contact - Restarting the contacts API webapp
- Retrieving the contact with the contact api
GET /contacts
returns an empty array
It could be related to not setting the "hostingEnvironment" to production for this check: https://github.com/azuredevcollege/trainingdays/blob/ddeccaa712cb9ad94d372a880bafd3ca13514d3e/day3/apps/dotnetcore/Scm/Adc.Scm.Api/Startup.cs#L44.