Skip to content

Conversation

@guardrex
Copy link
Collaborator

@guardrex guardrex commented Nov 13, 2025

Fixes #36343

Tom, Wade ... Just need one review to get this in. We're not going to wait for @danroth27 to look on this one. The tutorial requires this update to be viable for .NET 10 adopters. @danroth27 will possibly give me feedback later.

Sample updates have already been made. The 10.0 sample is alive and well at ...

https://github.com/dotnet/blazor-samples/tree/main/10.0/BlazorWebAppMovies

@danroth27 ... I guess you know that Javier fought with Copilot quite a bit before apparently giving up ...

The upshot for us here is that I'm having the dev manually place the changes for the Not Found feature after scaffolding. We're also on the RC package for code gen ...

<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.0-rc.1.25458.5" />

... and the scaffolder is setting up this foul property initializer in the Create component that we don't want ...

[SupplyParameterFromForm]
private Movie Movie { get; set; } = new();

I prefer not to get into the weeds with the change and reason for it in an introductory tutorial ... well ... unless you tell me that you want me to. 👂 If you see this before the PR merges and you want it fleshed out to do the prop init on component init, I'll do it on here. Otherwise, I'll version new guidance on a patch PR.

I've left myself inline tracking notes to react to the scaffolder updates as soon as they become available.


Internal previews

📄 File 🔗 Preview link
aspnetcore/blazor/project-structure.md aspnetcore/blazor/project-structure
aspnetcore/blazor/tutorials/movie-database-app/part-1.md aspnetcore/blazor/tutorials/movie-database-app/part-1
aspnetcore/blazor/tutorials/movie-database-app/part-3.md aspnetcore/blazor/tutorials/movie-database-app/part-3
aspnetcore/blazor/tutorials/movie-database-app/part-4.md aspnetcore/blazor/tutorials/movie-database-app/part-4

@guardrex guardrex self-assigned this Nov 13, 2025
@guardrex guardrex requested a review from Copilot November 13, 2025 18:27
Copilot finished reviewing on behalf of guardrex November 13, 2025 18:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the Blazor movie database tutorial for .NET 10, implementing the new Not Found feature that uses NavigationManager.NotFound() instead of navigating to a non-existent endpoint. The changes use moniker ranges to differentiate between .NET 10 and earlier versions (8.0-9.0), acknowledging that the scaffolder doesn't yet support this feature and requires manual implementation.

Key changes:

  • Adds .NET 10-specific code examples and instructions for implementing the NavigationManager.NotFound() method
  • Uses moniker ranges (>= aspnetcore-10.0 and < aspnetcore-10.0) to version content appropriately
  • Includes tracking comments for future scaffolder updates

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
part-4.md Adds .NET 10 moniker-versioned section showing the UpdateMovie method with NavigationManager.NotFound() for concurrency exception handling
part-3.md Adds .NET 10 instructions for manually implementing NotFound() in Details, Delete, and Edit components with diff examples
part-1.md Adds missing ReconnectModal component entries to the layout components list
project-structure.md Fixes typo changing .css to .js for ReconnectModal.razor.js file reference

Copy link
Contributor

@wadepickett wadepickett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm not seeing any issues. Approved.

@guardrex guardrex merged commit ca5329b into main Nov 13, 2025
4 checks passed
@guardrex guardrex deleted the guardrex/blazor-movies-tutorial-updates branch November 13, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[10.0] Update the movie dB tutorial

3 participants