mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
16 lines
572 B
C#
16 lines
572 B
C#
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using Northwind.BlazorWasm.Client;
|
|
using Packt.Shared;
|
|
using Northwind.BlazorWasm.Client.Data;
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
|
|
|
builder.Services.AddTransient<INorthwindService, NorthwindService>();
|
|
|
|
await builder.Build().RunAsync();
|