Book Image

Microsoft Azure Architect Technologies: Exam Guide AZ-300

By : Sjoukje Zaal
Book Image

Microsoft Azure Architect Technologies: Exam Guide AZ-300

By: Sjoukje Zaal

Overview of this book

From designing solutions on Azure to configuring and managing virtual networks, AZ-300 certification can help you achieve all this and more. Whether you want to get certified or gain hands-on experience in administering, developing, and architecting Azure solutions, this study guide will help you get started. The book features not only the different exam objectives, but also guides you through configuring, managing, securing, and architecting Azure resources. Divided into five modules, this book will systematically take you through the different concepts and features as you advance through the sections. The first module demonstrates how to deploy and configure infrastructure. You will cover techniques related to implementing workloads and security, before learning how to create and deploy apps in the next module. To build on your knowledge, the final two modules will get you up to speed with implementing authentication, data security, and application and platform monitoring, along with covering Azure storage, alerting, and automation strategies. Finally, you’ll work through exam-based mock tests with answers to boost your confidence in passing the exam. By the end of this book, you’ll have learned the concepts and techniques you need to know in order to prepare for the AZ-300 exam, along with the skills to design effective solutions on Microsoft Azure.
Table of Contents (30 chapters)
1
Section 1: Deploying and Configuring Infrastructure
9
Section 2: Implementing Workloads and Security
16
Section 3: Creating and Deploying Apps
19
Section 4: Implementing Authentication and Secure Data
22
Section 5: Developing for the Cloud and for Azure Storage
26
Mock Questions
27
Mock Answers

Creating, reading, updating, and deleting data tables by using code

In this demonstration, we are going to create the sample application. For this, we are going to create a new console application in Visual Studio 2019. We will first connect to our Azure SQL Database account.

Connecting to the Azure SQL database

  1. Open Visual Studio, and create a new console app (.NET) project.
  2. Name the project PacktSQLApp.
  3. Right-click on your project in the Solution Explorer, and select Manage NuGet Packages.
  4. Select Browse, search for System.Data.SqlClient, and install the package.
  5. Open Program.cs, and replace the references with the following:
using System;
using System.Data.SqlClient;
  1. Add the following variable in the Program.cs method:
static string connectionstring;
  1. Now, go back to the Azure portal. Navigate to the Azure SQL database that we created in the previous section. Under Settings, select Connection strings. Copy the connection string, as follows:
SQL database connection string
  1. Below...