Skip to content

Commit 91f4aaa

Browse files
authored
Merge pull request #34123 from dotnet/main
2 parents ca5a879 + d35ec47 commit 91f4aaa

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

aspnetcore/blazor/tutorials/movie-database-app/part-1.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,11 @@ A <xref:Microsoft.AspNetCore.Builder.WebApplicationBuilder> creates the app with
326326
var builder = WebApplication.CreateBuilder(args);
327327
```
328328

329-
Razor component services are added to the app by calling <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which enables Razor components to render and execute code on the server:
329+
Razor component services are added to the app by calling <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A>, which enables Razor components to render and execute code on the server, and <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents%2A> adds services to support rendering Interactive Server components:
330330

331331
```csharp
332-
builder.Services.AddRazorComponents();
332+
builder.Services.AddRazorComponents()
333+
.AddInteractiveServerComponents();
333334
```
334335

335336
The <xref:Microsoft.AspNetCore.Builder.WebApplication> (held by the `app` variable in the following code) is built:
@@ -385,12 +386,16 @@ app.UseStaticFiles();
385386

386387
:::moniker-end
387388

388-
<xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> maps components defined in the root `App` component to the given .NET assembly and renders routable components:
389+
<xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> maps components defined in the root `App` component to the given .NET assembly and renders routable components, and <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> configures interactive server-side rendering (interactive SSR) support for the app:
389390

390391
```csharp
391-
app.MapRazorComponents<App>();
392+
app.MapRazorComponents<App>()
393+
.AddInteractiveServerRenderMode();
392394
```
393395

396+
> [!NOTE]
397+
> The extension methods <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents%2A> on <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A> and <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> on <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> make the app capable of adopting interactive SSR, which isn't relevant until the last part of the tutorial series on interactivity. Over the next several articles, the app's components only adopt static SSR.
398+
394399
The app is run by calling <xref:Microsoft.AspNetCore.Builder.WebApplication.Run%2A> on the <xref:Microsoft.AspNetCore.Builder.WebApplication> (`app`):
395400

396401
```csharp

aspnetcore/blazor/tutorials/movie-database-app/part-2.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -303,23 +303,6 @@ builder.Services.AddQuickGridEntityFrameworkAdapter();
303303
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
304304
```
305305

306-
Static server-side rendering (static SSR) is enabled by calling:
307-
308-
* The service collection extension method <xref:Microsoft.Extensions.DependencyInjection.RazorComponentsServiceCollectionExtensions.AddRazorComponents%2A> to register services for server-side rendering (SSR) of Razor components.
309-
* The request pipeline extension method <xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A>, which maps the page components defined in the `App` component to the given assembly and renders the `App` component when a request matches a route to a component:
310-
311-
```csharp
312-
builder.Services.AddRazorComponents()
313-
.AddInteractiveServerComponents();
314-
315-
...
316-
317-
app.MapRazorComponents<App>()
318-
.AddInteractiveServerRenderMode();
319-
```
320-
321-
The extension methods <xref:Microsoft.Extensions.DependencyInjection.ServerRazorComponentsBuilderExtensions.AddInteractiveServerComponents%2A> and <xref:Microsoft.AspNetCore.Builder.ServerRazorComponentsEndpointConventionBuilderExtensions.AddInteractiveServerRenderMode%2A> make the app capable of adopting interactive SSR, which isn't relevant until the last part of the tutorial series on interactivity. Over the next several articles, the app's components only adopt static SSR.
322-
323306
## Create the initial database schema using EF Core's migration feature
324307

325308
The migrations feature in EF Core:

0 commit comments

Comments
 (0)