For Blazor Wasm use instead :
protected override async Task OnInitializedAsync()
{
provinces = await httpClient.GetFromJsonAsync<List<Provinces>>("provinces.json");
}
For more information about these methods please consult :
dotnet add package MudBlazor
Add the following to your HTML head section, it's either index.html or _Layout.cshtml/_Host.cshtml depending on whether you're running WebAssembly or Server.
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
Then open Pages _Layout.cshtml (Blazor Server .NET 6), Pages_Host.cshtml (Blazor Server .NET 7) or wwwroot/index.html (Blazor WebAssembly) and include this snippet :
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
You can also include globally in your _Imports.razor file of your Blazor application and import the namespaces :
@using Mudblazor
@using Mudblazor.Services
builder.Services.AddMudServices();
If you have any questions feel free to ask. 🗯️