Fixed a bug that local debugging gave an error when it tried to connect to the database after the site was published.
Use config transform to assign different connection strings. In the main web.config file, I use the local SQL database. In the web.release.config file, I update the connection string with the Azure one. So when I publish the webconfig file, VS will replace the connection strings, then the published website is still using Azure database.
---
Recently I found that building web applications is really fun. The purpose of making videos is for learning and future references. It might be not the best practice due to the fact that I am still learning. If you have a better solution, or you spot a mistake in my video, feel free to comment below. I appreciate your advice and I will refactor my work and video as soon as possible.