Creating a Simple Web App with a Database and Storage Account

Creating a Simple Web App with a Database and Storage Account

In this project, we’ll create a .NET Core application and a basic data entry form application where the coding part is already configured for us. This project will apply everything we have learned in the course so far.

We’ll create a person’s profile and view the list of all the database entries we’ll be working on. We’ll be using two main Azure services for it i.e., Azure SQL Server and storage account containers. The project is divided into subtasks and to complete it, we have to follow the instructions step by step:

  1. We set up a storage account. Here, we follow the same instructions we were given in the course.

  2. We create a storage container. We have to make sure that we allow read access as anonymous for our container for this project only. After that, we have to upload a BACPAC file on the container we’ll be creating.

  3. Then, we set up an SQL server. We make sure to add our client’s IP address to access this server.

  4. We import the SQL database using the BACPAC file already provided in step two. Once we have the database set up, we can see something like this.

Database deployed
Database deployed
  1. Lastly, we update our code. We have to update the “to do” section of the code with the connection string of our deployed resources. Here are the changes we have to make to get our application up and running:

    • Change the connection string of the Azure SQL Server database with our deployed database in the appsettings.json file.

    • Update the connection string of the Azure storage account with our deployed storage account in the UploadImagesService class.

    • Update the name of the container with our storage container name in the UploadImagesService class.

    Note: If everything goes smoothly, we’ll see something like the following.

Profiles List
Profiles List