You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For an example use of the QuickGrid scaffolder, see <xref:blazor/tutorials/movie-database-app/index>.
570
+
571
+
<!-- UPDATE 10.0 - PU work tracked by https://github.com/dotnet/aspnetcore/issues/58716.
572
+
Versioning out at 10.0 for now. -->
573
+
574
+
:::moniker range="< aspnetcore-10.0"
575
+
576
+
## Multiple concurrent EF Core queries trigger `System.InvalidOperationException`
577
+
578
+
Multiple concurrent EF Core queries can trigger the following <xref:System.InvalidOperationException?displayProperty=fullName>:
579
+
580
+
> :::no-loc text="System.InvalidOperationException: A second operation was started on this context instance before a previous operation completed. This is usually caused by different threads concurrently using the same instance of DbContext. For more information on how to avoid threading issues with DbContext, see https://go.microsoft.com/fwlink/?linkid=2097913.":::
581
+
582
+
This scenario is scheduled for improvement in an upcoming release of ASP.NET Core. For more information, see [[Blazor] Improve the experience with QuickGrid and EF Core (`dotnet/aspnetcore`#58716)](https://github.com/dotnet/aspnetcore/issues/58716).
583
+
584
+
In the meantime, you can address the problem using an <xref:Microsoft.AspNetCore.Components.QuickGrid.QuickGrid%601.ItemsProvider%2A> with a cancellation token. The cancellation token prevents concurrent queries by cancelling the previous request when a new request is issued.
585
+
586
+
Consider the following example, which is based on the movie database `Index` component for the <xref:blazor/tutorials/movie-database-app/index> tutorial. The simpler version scaffolded into the app can be seen in the article's [sample app](xref:blazor/tutorials/movie-database-app/index#sample-app). The `Index` component scaffolded into the app is replaced by the following component.
A Visual Studio debugger regression breaks with a <xref:Microsoft.AspNetCore.Components.NavigationException> on the line that navigates back to the `Index` page:
475
+
In .NET 9, the Visual Studio debugger may break with a <xref:Microsoft.AspNetCore.Components.NavigationException> on the line that navigates back to the `Index` page:
478
476
479
477

480
478
481
-
To resolve this problem until the debugger is updated by a future Visual Studio release:
479
+
To resolve this problem:
482
480
483
481
1. Deselect the checkbox for **Break when this exception type is user-handled**.
484
482
2. Select the **Continue** button in the menu bar to continue execution.
485
483
486
-
The exception won't be thrown when the <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> method is executed throughout the rest of the tutorial series.
484
+
The exception isn't thrown when a <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> method is executed throughout the rest of the tutorial series.
485
+
486
+
In .NET 10 or later:
487
+
488
+
* Updates to the way that <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> manages navigation never result in a <xref:Microsoft.AspNetCore.Components.NavigationException>.
489
+
* The Visual Studio debugger doesn't break when processing <xref:Microsoft.AspNetCore.Components.NavigationManager.NavigateTo%2A> calls with a valid endpoint.
Copy file name to clipboardExpand all lines: aspnetcore/release-notes/aspnetcore-10/includes/blazor.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Apply a stylesheet class to a row of the grid based on the row item using the ne
15
15
16
16
For more information, see <xref:blazor/components/quickgrid?view=aspnetcore-10.0#style-a-table-row-based-on-the-row-item>.
17
17
18
-
### Blazor script
18
+
### Blazor script as static web asset
19
19
20
20
In prior releases of .NET, the Blazor script is served from an embedded resource in the ASP.NET Core shared framework. In .NET 10 or later, the Blazor script is served as a static web asset with automatic compression and fingerprinting.
21
21
@@ -28,7 +28,7 @@ For more information, see the following resources:
28
28
29
29
The [`[Route]` attribute](xref:Microsoft.AspNetCore.Components.RouteAttribute) now supports route syntax highlighting to help visualize the structure of the route template:
30
30
31
-

31
+

0 commit comments