In the first part we will create a new Azure SQL database, use Entity Framework Core migrations to create tables and implement the code to ingest our test PDF file.
This section walks through creating the database in Azure.
- Login to the Azure portal
- Type Azure SQL in the search box in the top center
- Select the Azure SQL item
- Click the Create button in the upper left corner
This will show you a few deployment options.
- In the left item with SQL databases -> Single database, click the Create button
We can now create the Azure SQL Database and Server
- Select the subscription you want to use and create a new resource group named rg-azuresql-lab
- Give the database a unique name (I used db-sqlazure-lab for mine)
- Next click the Create new link to create a new Azure SQL database server
- On the Create SQL Database Server page, fill in the following:
- Server name
- Location
- Authentication method -> choose the Use SQL authentication
- Server admin Login
- Password and confirm password
-
Click OK
-
Back on the Create SQL Database page, verify the Workload environment is set to Development
If you want you can use the Configure database link to verify the sizes and see an estimated cost.
- Click the Next: Networking button at the bottom of the page
- On the Connectivity method, select Public endpoint, then turn the switch on for Add current client IP address.
This will allow you to access the server when we verify the schema and data later.
- Next click Review + Create button
I'm using the East US 2 datacenter and it shows I'll be chared <$5.00 for a month of usage
- Click the Create button to create the database and server.
This will take a few minutes, so let's move on to the code.