Skip to content

Commit 0f2f256

Browse files
author
Artak Mkrtchyan
committed
Updated the SavePoints to 5.0
1 parent 97128c5 commit 0f2f256

File tree

33 files changed

+58
-55
lines changed

33 files changed

+58
-55
lines changed

docs/04-refactor-state-management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Create a new class called `OrderState` in the Client Project root directory - an
1818
public static async Task Main(string[] args)
1919
{
2020
var builder = WebAssemblyHostBuilder.CreateDefault(args);
21-
builder.RootComponents.Add<App>("app");
21+
builder.RootComponents.Add<App>("#app");
2222

2323
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
2424
builder.Services.AddScoped<OrderState>();

docs/06-authentication-and-authorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To enable the authentication services, add a call to `AddApiAuthorization` in *P
4949
public static async Task Main(string[] args)
5050
{
5151
var builder = WebAssemblyHostBuilder.CreateDefault(args);
52-
builder.RootComponents.Add<App>("app");
52+
builder.RootComponents.Add<App>("#app");
5353

5454
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
5555
builder.Services.AddScoped<OrderState>();
@@ -68,8 +68,8 @@ The added services will be configured by default to use an identity provider on
6868
```csharp
6969
public void ConfigureServices(IServiceCollection services)
7070
{
71-
services.AddMvc()
72-
.AddNewtonsoftJson();
71+
services.AddControllersWithViews();
72+
services.AddRazorPages();
7373

7474
services.AddDbContext<PizzaStoreContext>(options =>
7575
options.UseSqlite("Data Source=pizza.db"));

save-points/00-get-started/BlazingPizza.Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Program
1111
public static async Task Main(string[] args)
1212
{
1313
var builder = WebAssemblyHostBuilder.CreateDefault(args);
14-
builder.RootComponents.Add<App>("app");
14+
builder.RootComponents.Add<App>("#app");
1515

1616
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
1717

save-points/00-get-started/BlazingPizza.Client/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<title>Blazing Pizza</title>
1212
</head>
1313
<body>
14-
<app>
14+
<div id="app">
1515
<div class="loading-bar"></div>
16-
</app>
16+
</div>
1717

1818
<div id="blazor-error-ui">
1919
An unhandled error has occurred.

save-points/00-get-started/BlazingPizza.Server/Startup.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public Startup(IConfiguration configuration)
1919

2020
public void ConfigureServices(IServiceCollection services)
2121
{
22-
services.AddMvc()
23-
.AddNewtonsoftJson();
22+
services.AddControllersWithViews();
23+
services.AddRazorPages();
2424

2525
services.AddDbContext<PizzaStoreContext>(options =>
2626
options.UseSqlite("Data Source=pizza.db"));

save-points/01-Components-and-layout/BlazingPizza.Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Program
1111
public static async Task Main(string[] args)
1212
{
1313
var builder = WebAssemblyHostBuilder.CreateDefault(args);
14-
builder.RootComponents.Add<App>("app");
14+
builder.RootComponents.Add<App>("#app");
1515

1616
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
1717

save-points/01-Components-and-layout/BlazingPizza.Client/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<title>Blazing Pizza</title>
1212
</head>
1313
<body>
14-
<app>
14+
<div id="app">
1515
<div class="loading-bar"></div>
16-
</app>
16+
</div>
1717

1818
<div id="blazor-error-ui">
1919
An unhandled error has occurred.

save-points/01-Components-and-layout/BlazingPizza.Server/Startup.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ public Startup(IConfiguration configuration)
1919

2020
public void ConfigureServices(IServiceCollection services)
2121
{
22-
services.AddMvc()
23-
.AddNewtonsoftJson();
22+
services.AddControllersWithViews();
23+
services.AddRazorPages();
24+
2425

2526
services.AddDbContext<PizzaStoreContext>(options =>
2627
options.UseSqlite("Data Source=pizza.db"));

save-points/02-customize-a-pizza/BlazingPizza.Client/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class Program
1111
public static async Task Main(string[] args)
1212
{
1313
var builder = WebAssemblyHostBuilder.CreateDefault(args);
14-
builder.RootComponents.Add<App>("app");
14+
builder.RootComponents.Add<App>("#app");
1515

1616
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
1717

save-points/02-customize-a-pizza/BlazingPizza.Client/wwwroot/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
<title>Blazing Pizza</title>
1212
</head>
1313
<body>
14-
<app>
14+
<div id="app">
1515
<div class="loading-bar"></div>
16-
</app>
16+
</div>
1717

1818
<div id="blazor-error-ui">
1919
An unhandled error has occurred.

0 commit comments

Comments
 (0)