Understanding hosted applications
When we create a new Blazor WebAssembly project by using Microsoft's Blazor WebAssembly App 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:
The hosted Blazor WebAssembly app, created by the Blazor WebAssembly App 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, of this book. 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...