Book Image

A Developer's Guide to .NET in Azure

By : Anuraj Parameswaran, Tamir Al Balkhi
Book Image

A Developer's Guide to .NET in Azure

By: Anuraj Parameswaran, Tamir Al Balkhi

Overview of this book

A Developer’s Guide to .NET in Azure helps you embark on a transformative journey through Microsoft Azure that is tailored to .NET developers. This book is a curated compendium that’ll enable you to master the creation of resilient, scalable, and highly available applications. The book is divided into four parts, with Part 1 demystifying Azure for you and emphasizing the portal's utility and seamless integration. The chapters in this section help you configure your workspace for optimal Azure synergy. You’ll then move on to Part 2, where you’ll explore serverless computing, microservices, containerization, Dapr, and Azure Kubernetes Service for scalability, and build pragmatic, cost-effective applications using Azure Functions and Container apps. Part 3 delves into data and storage, showing you how to utilize Azure Blob Storage for unstructured data, Azure SQL Database for structured data, and Azure Cosmos DB for document-oriented data. The final part teaches you about messaging and security, utilizing Azure App Configuration, Event Hubs, Service Bus, Key Vault, and Azure AD B2C for robust, secure applications. By the end of this book, you’ll have mastered Azure's responsive infrastructure for exceptional applications.
Table of Contents (20 chapters)
1
Part 1: An Introduction to Your Environment
3
Part 2: Serverless and Microservices
8
Part 3: Data and Storage
12
Part 4: Messaging Mechanisms and Security

Setting up your local environment for Azure development

You need to set up and configure the development environment for building your applications in .NET and Azure. In this section, you will configure Visual Studio Code (VS Code) and Visual Studio. Visual Studio Code is an open source editor for building ASP.NET Core and C# applications.

Installing Visual Studio Code

Follow these steps to install Visual Studio Code:

  1. Visit the Microsoft site to download Visual Studio Code: https://visualstudio.microsoft.com/downloads/
Figure 1.34 – Visual Studio/VS Code download page

Figure 1.34 – Visual Studio/VS Code download page

  1. Based on your development machine’s operating system, download the applicable VS Code executable.

Figure 1.35 – VS Code – download page

Figure 1.35 – VS Code – download page

  1. Accept the terms and conditions and continue with the installation:
Figure 1.36 – VS Code Editor

Figure 1.36 – VS Code Editor

  1. Unlike on Windows and Mac, installing VS Code on Linux is easy – we just need to run the following command: sudo snap install --classic code. This will install VS Code on Linux. For more information on the VS Code installation, check out this page: https://code.visualstudio.com/docs/setup/linux.
  2. Click on Extensions or press the Ctrl + Shift + X shortcut keys on Windows or Cmd + Shift + X on Mac and install the following extensions:
    • Azure Tools
    • Azure CLI Tools
    • Azure Pipelines
    • Azure Kubernetes Service
    • Azure Storage Explorer
    • C# Extension

Installing Visual Studio Community 2022

Follow these steps to install Visual Studio Community Edition 2022:

  1. Visit the Microsoft site to download Visual Studio: https://visualstudio.microsoft.com/downloads/
Figure 1.37 – Visual Studio download page

Figure 1.37 – Visual Studio download page

  1. Install Azure Development and the accompanying packages for .NET development; the Visual Studio setup will prompt for different installation configurations or workloads.

Figure 1.38 – Visual Studio – installation configuration

Figure 1.38 – Visual Studio – installation configuration

  1. Sign in to the cloud account you previously created to access the Azure resources within your IDE.
Figure 1.39 – Visual Studio – first screen

Figure 1.39 – Visual Studio – first screen

In this section, you learned about installing and configuring your development environment. VS Code is a cross-platform editor for debugging applications and Visual Studio is a fully featured IDE for building and debugging applications.

Now is the time to create our first project!