Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
vermeir_nico_introducing_net_6_getting_started_with_blazor_m.pdf
Скачиваний:
19
Добавлен:
26.06.2023
Размер:
11.64 Mб
Скачать

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