Skip to content

Commit 702026b

Browse files
committed
Initial movie tutorial updates
1 parent a681ae8 commit 702026b

File tree

2 files changed

+6
-21
lines changed

2 files changed

+6
-21
lines changed

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

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

289-
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:
289+
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:
290290

291291
```csharp
292-
builder.Services.AddRazorComponents();
292+
builder.Services.AddRazorComponents()
293+
.AddInteractiveServerComponents();
293294
```
294295

295296
The <xref:Microsoft.AspNetCore.Builder.WebApplication> (held by the `app` variable in the following code) is built:
@@ -345,10 +346,11 @@ app.UseStaticFiles();
345346

346347
:::moniker-end
347348

348-
<xref:Microsoft.AspNetCore.Builder.RazorComponentsEndpointRouteBuilderExtensions.MapRazorComponents%2A> maps components defined in the root `App` component to the given .NET assembly and renders routable components:
349+
<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) for the app:
349350

350351
```csharp
351-
app.MapRazorComponents<App>();
352+
app.MapRazorComponents<App>()
353+
.AddInteractiveServerRenderMode();
352354
```
353355

354356
The app is run by calling <xref:Microsoft.AspNetCore.Builder.WebApplication.Run%2A> on the <xref:Microsoft.AspNetCore.Builder.WebApplication> (`app`):

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)