Blazor WebAssembly

Introduction

The are currently three 'flavours' of Blazor: Blazor Server, Blazor WebAssembly and, now, .Net MAUI Blazor.  To date I have only developed Blazor Server apps (in my own amateurish way) and have studiously ignored Blazor WebAssembly (WASM).  .Net MAUI Blazor is far too new for me even to think about!

However, the time has come for me to consider writing a simple app in WASM, just to get my feet wet.  The differences between Server and WASM are explained in this stackoverflow question and in this C#Corner article, but seem to boil down to the following, cherry-picked. points:

The principal benefits of Blazor Server are that the download size is significantly smaller than a Blazor WebAssembly app and that all processing is on the server. The latter means that interaction with databases is more direct, making them, possibly faster and easier to secure.  The downsides of the server model are that scaling is limited and if the connection between the client and server fails the app stops working.

On the other hand, the main benefits of Blazor WASM is that work is offloaded to the client, meaning that server requirements are smaller and hence scaling is easier and cheaper.  The price for this is that download sizes are, initially larger.

In simple terms I think this boils down to one fundamental point: Blazor Server cannot scale to large number of users cheaply, if at all.

For any application I develop it's very unlikely that thousands of users will ever need access, let alone at any one time! For my purposes I'm not completely convinced the WASM model is necessary.  Regardless, perhaps I should find out what's involved...

Countries & Cities

My first experiment with Blazor was an application that recorded countries, cities and their populations.  This used Dapper to connect to a Microsoft SQL database and Syncfusion controls to display the data.  I intend to use the same example, again using Dapper and Syncfusion, but this time using SQLite as the database.  (My reason for doing this is that ultimately I propose to deploy to Azure, for testing purposes if nothing else, and my Azure subscription is now older than 12 months and a Microsoft SQL database would no longer be free.)

I intend to document this project as a self-contained process, and will try to avoid referring back to the original Blazor Server project, other than for comparison purposes.

Let's get started.