Book Image

Implementing Microsoft Azure Architect Technologies: AZ-303 Exam Prep and Beyond - Second Edition

By : Brett Hargreaves, Sjoukje Zaal
Book Image

Implementing Microsoft Azure Architect Technologies: AZ-303 Exam Prep and Beyond - Second Edition

By: Brett Hargreaves, Sjoukje Zaal

Overview of this book

From designing solutions on Azure to configuring and managing virtual networks, the AZ-303 certification validates your knowledge and skills for all this and much more. Whether you want to take the certification exam or gain hands-on experience in administering, developing, and architecting Azure solutions, this study guide will help you get started. Divided into four modules, this book systematically takes you through the wide range of concepts and features covered in the AZ-303 exam. The first module demonstrates how to implement and monitor infrastructure. You'll develop the skills required to deploy and manage core Azure components such as virtual machines, networking, storage, and Active Directory (AD). As you progress, you'll build on that knowledge and learn how to create resilient and secure applications before moving on to working with web apps, functions, and containers. The final module will get you up to speed with data platforms such as SQL and Cosmos DB, including how to configure the different high availability options. Finally, you'll solve mock tests and assess yourself with the answers provided to get ready to take the exam with confidence. By the end of this book, you'll have learned the concepts and techniques you need to know to prepare for the AZ-303 exam and design effective solutions on Microsoft Azure.
Table of Contents (25 chapters)
1
Section 1: Implement and Monitor Azure Infrastructure
10
Section 2: Implement Management and Security Solutions
14
Section 3: Implement Solutions for Apps
18
Section 4: Implement and Manage Data Platforms
21
Chapter 17: Mock Exam Questions
22
Chapter 18: Mock Exam Answers

Creating, reading, updating, and deleting data tables 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

Follow these steps to connect to establish the connection:

  1. Open Visual Studio and create a new console app (.NET) project.
  2. Name the project PacktSQLApp.
  3. Right-click on your project in 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;
  6. Add the following variable to the Program.cs method:
    static string connectionstring;
  7. 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...