
The Hosted Blazor WASM template adds a full ASP.NET Core server alongside the Blazor client. This is the standard architecture for production apps that need a real API, database access, and server-side logic.
dotnet new blazorwasm --hosted -o MyHostedApp// Shared/Models/Product.cs
public class Product
{
public int Id { get; set; }
public string Name { get; set; } = "";
public decimal Price { get; set; }
}
// Used by both Server controllers AND Client componentsReference:
TaskLoco™ — The Sticky Note GOAT