Understanding hosted applications
When we create a new Blazor WebAssembly project by using Microsoft’s Blazor WebAssembly App Empty project template, we have the option to create a hosted Blazor WebAssembly app by checking the ASP.NET Core Hosted checkbox.
The following screenshot highlights the ASP.NET Core Hosted checkbox:
Figure 11.1: Blazor WebAssembly App Empty project template
The hosted Blazor WebAssembly app, created by the Blazor WebAssembly App Empty project template, includes the following three projects:
- Client project
- Server project
- Shared project
Client project
The client project is a client-side Blazor WebAssembly project. It is almost identical to the standalone Blazor WebAssembly app we created in Chapter 2, Building Your First Blazor WebAssembly Application. The only big difference is in how the data is accessed. In the client project, the sample data is accessed from the server project using Web API endpoints...