![](/user_photo/_userpic.png)
- •Table of Contents
- •About the Author
- •Acknowledgments
- •Introduction
- •Version Support
- •Supported Versions
- •A Unified Platform
- •Roadmap
- •Supported Operating Systems
- •Command Line Interface
- •Desktop Development
- •Blazor
- •MAUI
- •Wrapping Up
- •.NET 6 Architecture
- •Runtimes
- •CoreCLR
- •Mono
- •WinRT
- •Managed Execution Process
- •Desktop Packs
- •Wrapping Up
- •Dotnet New
- •Dotnet Restore
- •NuGet.config
- •Dotnet Build
- •Dotnet Publish
- •Dotnet Run
- •Dotnet Test
- •Using the CLI in GitHub Actions
- •Other Commands
- •Wrapping Up
- •WinAPI
- •WinForms
- •STAThread
- •WinForms Startup
- •DPI Mode
- •Responding to Scale Events
- •Visual Styles
- •Text Rendering
- •The Message Loop
- •The Form Designer
- •WPF Startup
- •XAML Layout
- •Visual Tree
- •Data Binding
- •Windows App SDK
- •Building a Windows App SDK application
- •Using Windows APIs with Windows App SDK
- •Packaging
- •Migrating to .NET 6
- •Upgrade Assistant
- •Wrapping Up
- •Blazor WebAssembly
- •Creating a Blazor Wasm Project
- •Blazor Progressive Web Apps
- •Exploring the Blazor Client Project
- •Blazor in .NET 6
- •Blazor Component System
- •Creating Blazor Pages
- •Running a Blazor App
- •Blazor Server
- •SignalR
- •Blazor Desktop
- •Wrapping Up
- •Project Structure
- •Exploring MAUI
- •The Cross-Platform World
- •Application Lifecycle
- •MVVM
- •MVVM Toolkit
- •Wrapping Up
- •Model-View-Controller
- •Routing
- •Views
- •Controllers
- •Controller-Based APIs
- •Minimal APIs
- •Wrapping Up
- •Web Apps
- •Creating an App Service
- •Static Web Apps
- •Web App for Containers
- •Docker
- •Azure Functions
- •Deploying Azure Functions
- •Wrapping Up
- •Record Types
- •Monolith Architecture
- •Microservices
- •Container Orchestration
- •Kubernetes
- •Docker Compose
- •Dapr
- •Installing Dapr
- •Dapr State Management
- •Wrapping Up
- •Roslyn
- •Compiler API
- •Diagnostic API
- •Scripting API
- •Workspace API
- •Syntax Tree
- •Roslyn SDK
- •Source Generators
- •Writing a Source Generator
- •Debugging Source Generators
- •Wrapping Up
- •Garbage Collector
- •The Heap
- •The Stack
- •Garbage Collection
- •A Look at the Threadpool
- •Async in .NET 6
- •Await/Async
- •Cancellations
- •WaitAsync
- •Conclusion
- •Index
Chapter 7 ASP.NET Core
Wrapping Up
ASP.NET has been a popular choice for building enterprise web applications or services for years, and the framework keeps evolving. MVC is easy to use and familiar for those coming from other languages since it largely depends on the Model-View-Controller pattern. WebAPI uses the same design pattern to provide easy to build and use RESTful APIs. In .NET 6, we got minimal APIs, which is a brand-new member of the ASP.NET family. With minimal APIs, we can start building APIs faster than ever before, but we do give up a bit of structure. It is a trade-off. Controller-based APIs are built using a very well-known design pattern, but for smaller APIs, it is easy to get lost in the large amount of files in a project. With minimal APIs, there is a minimal amount of files or code required, but structure might get lost quickly. So choose wisely and use extension methods to group your endpoints together.
219
CHAPTER 8
Microsoft Azure
Over the past couple of years, cloud computing has grown to gigantic proportions, and it is not hard to see why. Companies can potentially save tons of money by not buying and maintaining their own server hardware; instead, they can opt for a pay-per-use model that can scale from one server to hundreds and back to one in mere minutes. Cloud providers like Microsoft make it very easy to get your software up and running on a cloud service and at the same time give you power tools to fully configure a cloud-based network that can even be an extension to your on-premise network.
Microsoft Azure, or just Azure for short, is Microsoft’s public cloud platform. Everyone with a credit card can create an account and start creating and publishing cloud services. The entire breadth of Azure is too big to describe in one chapter of a book, so I have selected much used services where .NET 6 can be important.
Configuring Azure services can be done in multiple ways. When starting with Azure, you will most likely first encounter the Azure portal https://portal.azure.com.
A second popular approach is through the CLI. The Azure SDK ships with its own command line tools; these tools can be used to automate Azure actions, for example, to include them in a CI/CD pipeline. Visual Studio also ships with some Azure integrations, for example, to publish web applications to Azure. These integrations are very useful for a quick start but are quite limited in the end. The examples in this chapter are all done through the Azure portal. Keep in mind that the Azure portal is a web application that evolves very fast, so by the time you read this, things might look slightly different but the concepts will remain the same.
In this chapter, we’ll walk through some of the Azure services. To follow along, you will need an Azure account; costs may be involved depending on the services and tiers selected. Free Azure trials are available at https://azure.microsoft.com/en-us/free.
221
© Nico Vermeir 2022
N. Vermeir, Introducing .NET 6, https://doi.org/10.1007/978-1-4842-7319-7_8