Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Blazor tutorial on BWA with EF Core #32747

Merged
merged 72 commits into from
Aug 26, 2024
Merged

Conversation

guardrex
Copy link
Collaborator

@guardrex guardrex commented Jun 5, 2024

Fixes #32359

Additional Updates

Per the Tooling article review, I'll be making the following changes shortly for the CLI gestures ...

  • Change the code language to "dotnetcli" throughout.
  • Switch over to dotnet watch.
  • Change the "launch" language to "Open a browser at the localhost URL shown in the console."

For VSC, create the project with the Command Palette experience.

Outline

  • Part 1: Create a Blazor Web App
    • Prerequisites
    • Create a Blazor Web App with static server-side rendering (static SSR)
    • Run the app
    • Stop the app
    • Examine the project files: Subsections cover all of the folders and files of the app.
  • Part 2: Add and scaffold a model
    • Add a data model: Also covers basics on data annotations, but validation DA is covered later.
    • Add Nuget packages and tools: Only for the VSC and CLI pivots.
    • Scaffold the model
    • Files created and updated by scaffolding
    • Create the initial database schema using EF Core's migration feature
    • Test the app
    • Stop the app
  • Part 3: Learn about Razor components
    • Razor components
    • NavMenu component for navigation
    • MainLayout component for layout
    • Create, Read, Update, Delete (CRUD) components
      • Index component
      • Details component
      • Create component
      • Delete component
    • Mitigate overposting attacks
    • Globalization
  • Part 4: Work with a database
    • Database context
    • Database technology
    • Seed the database
    • Bind a form to a model
    • Concurrency exception handling
    • Stop the app
  • Part 5: Add validation
    • Validation using data annotations
    • Add validation to the Movie model
    • Create an EF Core migration and update the database
  • Part 6: Add search
    • Implement a filter feature for the QuickGrid component
    • Stop the app
  • Part 7: Add a new field
    • Add a movie rating to the app's model
    • Add the movie rating to the app's CRUD components
    • Update the database
    • Drop and recreate the database for non-SQL Server providers: Only for VSC and CLI pivots.
  • Part 8: Add interactivity
    • Adopt interactivity
    • Sortable QuickGrid
    • Use C# code and interactivity to search by title
    • Congratulations!
    • Next steps

Internal previews

Toggle expand/collapse
📄 File 🔗 Preview link
aspnetcore/blazor/call-web-api.md Call a web API from ASP.NET Core Blazor
aspnetcore/blazor/components/data-binding.md ASP.NET Core Blazor data binding
aspnetcore/blazor/components/quickgrid.md ASP.NET Core Blazor QuickGrid component
aspnetcore/blazor/tutorials/index.md aspnetcore/blazor/tutorials/index
aspnetcore/blazor/tutorials/movie-database-app/index.md aspnetcore/blazor/tutorials/movie-database-app/index
aspnetcore/blazor/tutorials/movie-database-app/part-1.md aspnetcore/blazor/tutorials/movie-database-app/part-1
aspnetcore/blazor/tutorials/movie-database-app/part-2.md aspnetcore/blazor/tutorials/movie-database-app/part-2
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
aspnetcore/blazor/tutorials/movie-database-app/part-5.md aspnetcore/blazor/tutorials/movie-database-app/part-5
aspnetcore/blazor/tutorials/movie-database-app/part-6.md aspnetcore/blazor/tutorials/movie-database-app/part-6
aspnetcore/blazor/tutorials/movie-database-app/part-7.md aspnetcore/blazor/tutorials/movie-database-app/part-7
aspnetcore/blazor/tutorials/movie-database-app/part-8.md aspnetcore/blazor/tutorials/movie-database-app/part-8

@guardrex guardrex self-assigned this Jun 5, 2024
@guardrex guardrex marked this pull request as ready for review June 6, 2024 15:55
@guardrex
Copy link
Collaborator Author

@danroth27 ... Checked everything again start-to-finish. I fixed a number of little 😈. I confirmed and updated the article code is correct, and I've updated the sample app in the samples repo.

Do you want to take another look, or should I go ahead and merge this?

@guardrex
Copy link
Collaborator Author

@danroth27 ... I made a final set of small updates, and the sample app has been updated ...

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

... including a bit on deleting the database in SSOX after finishing with the tutorial.

Do you want to publish now, or do you want to wait until those final NIT scaffolder updates land at RC1?

Either way, I'll re-walk the entire tutorial soon after 9.0 GA to confirm everything is all 😄 and 🍭. I've left myself a tracking reminder on it in the .NET 9 tracking issue.

Copy link
Member

@danroth27 danroth27 left a comment

Choose a reason for hiding this comment

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

Looks great!

@guardrex
Copy link
Collaborator Author

Awesome!

Merge it now, or wait for RC1 scaffolding updates?

@danroth27
Copy link
Member

Merge it now, or wait for RC1 scaffolding updates?

I'm ok with publishing now assuming users can successfully follow this tutorial without the scaffolding tweaks.

@guardrex guardrex merged commit c7b835d into main Aug 26, 2024
3 checks passed
@guardrex guardrex deleted the guardrex/blazor-tutorial branch August 26, 2024 19:31
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.

Add a Blazor tutorial on using scaffolding to connect to data
4 participants