From 7445076caee1d00bd3633382e898924974b9937c Mon Sep 17 00:00:00 2001 From: Kenneth Manuel Lieyanto <64641815+kennethmanuel@users.noreply.github.com> Date: Sun, 17 Nov 2024 22:34:38 +0700 Subject: [PATCH 1/2] Add missing package for VSC/CLI (#34150) --- .../tutorials/movie-database-app/part-2.md | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/aspnetcore/blazor/tutorials/movie-database-app/part-2.md b/aspnetcore/blazor/tutorials/movie-database-app/part-2.md index b7141aecef6c..ea3f08d8836a 100644 --- a/aspnetcore/blazor/tutorials/movie-database-app/part-2.md +++ b/aspnetcore/blazor/tutorials/movie-database-app/part-2.md @@ -128,6 +128,7 @@ dotnet add package Microsoft.EntityFrameworkCore.SqlServer dotnet add package Microsoft.EntityFrameworkCore.Tools dotnet add package Microsoft.AspNetCore.Components.QuickGrid dotnet add package Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter +dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore ``` > [!IMPORTANT] @@ -138,11 +139,12 @@ dotnet add package Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdap The preceding commands add: -* [Command-line interface (CLI) tools for EF Core](/ef/core/miscellaneous/cli/dotnet) -* [`aspnet-codegenerator` scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator) -* Design time tools for EF Core -* The SQLite and SQL Server providers with the EF Core package as a dependency -* [`Microsoft.VisualStudio.Web.CodeGeneration.Design`](https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design) for scaffolding +* [Command-line interface (CLI) tools for EF Core](/ef/core/miscellaneous/cli/dotnet). +* [`aspnet-codegenerator` scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator). +* Design time tools for EF Core. +* The SQLite and SQL Server providers with the EF Core package as a dependency. +* [`Microsoft.VisualStudio.Web.CodeGeneration.Design`](https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design) for scaffolding. +* [`Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore`](https://www.nuget.org/packages/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore) to use the extension method in the `Program` file, which captures database-related exceptions. In the **Command Palette** (Ctrl+Shift+P), use the `.NET: Build` command to build the app. @@ -169,6 +171,7 @@ dotnet add package Microsoft.EntityFrameworkCore.SqlServer dotnet add package Microsoft.EntityFrameworkCore.Tools dotnet add package Microsoft.AspNetCore.Components.QuickGrid dotnet add package Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter +dotnet add package Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore ``` > [!IMPORTANT] @@ -176,11 +179,12 @@ dotnet add package Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdap The preceding commands add: -* [Command-line interface (CLI) tools for EF Core](/ef/core/miscellaneous/cli/dotnet) -* [`aspnet-codegenerator` scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator) -* Design time tools for EF Core -* The SQLite and SQL Server providers with the EF Core package as a dependency -* [`Microsoft.VisualStudio.Web.CodeGeneration.Design`](https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design) for scaffolding +* [Command-line interface (CLI) tools for EF Core](/ef/core/miscellaneous/cli/dotnet). +* [`aspnet-codegenerator` scaffolding tool](xref:fundamentals/tools/dotnet-aspnet-codegenerator). +* Design time tools for EF Core. +* The SQLite and SQL Server providers with the EF Core package as a dependency. +* [`Microsoft.VisualStudio.Web.CodeGeneration.Design`](https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design) for scaffolding. +* [`Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore`](https://www.nuget.org/packages/Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore) to use the extension method in the `Program` file, which captures database-related exceptions. In a command shell opened to the project's root folder, execute the [`dotnet build`](/dotnet/core/tools/dotnet-build) command: From 23283d84e202ebaaaad37fc17980dbec74c3c0c7 Mon Sep 17 00:00:00 2001 From: Luke Latham <1622880+guardrex@users.noreply.github.com> Date: Sun, 17 Nov 2024 10:35:12 -0500 Subject: [PATCH 2/2] Explain field used by example (#34151) --- aspnetcore/blazor/components/virtualization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/blazor/components/virtualization.md b/aspnetcore/blazor/components/virtualization.md index 0985702a6a3c..033f7dddea4a 100644 --- a/aspnetcore/blazor/components/virtualization.md +++ b/aspnetcore/blazor/components/virtualization.md @@ -97,7 +97,7 @@ The items provider receives an component can only accept **one item source** from its parameters, so don't attempt to simultaneously use an items provider and assign a collection to `Items`. If both are assigned, an is thrown when the component's parameters are set at runtime. -The following example loads employees from an `EmployeeService` (not shown): +The following example loads employees from an `EmployeeService` (not shown). The `totalEmployees` field would typically be assigned by calling a method on the same service (for example, `EmployeesService.GetEmployeesCountAsync`) elsewhere, such as during component initialization. ```csharp private async ValueTask> LoadEmployees(