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

Page 735 - Bullet 1 #14

Open
BobMolloy opened this issue Dec 20, 2022 · 0 comments
Open

Page 735 - Bullet 1 #14

BobMolloy opened this issue Dec 20, 2022 · 0 comments

Comments

@BobMolloy
Copy link

BobMolloy commented Dec 20, 2022

The code runs without error on Page 724, bullet 3. This error first appears on Page 726, bullet 7.

An unhandled exception occurred while processing the request.

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.
Microsoft.EntityFrameworkCore.Infrastructure.Internal.ConcurrencyDetector.EnterCriticalSection()

Northwind.BlazorServer.Pages.Customers.OnParametersSetAsync() in Customers.razor

| 59. customers = await db.Customers.ToListAsync();

I eventually copied your Northwind.BlazorServer code to my solution and it worked. I can't figure out what the difference is. Of course, your code has moved on from page 726. What I know for sure is that, between pages 724 and 726, something went wrong.

I'm attaching the server output.
BlazorServer Server Output.txt

Here is my code. It's original location is C:\cs11dotnet7\PracticalApps
Northwind.BlazorServer.zip

@BobMolloy BobMolloy changed the title Page 726 - Bullet 8 Page 735 - Bullet 1 Dec 21, 2022
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

No branches or pull requests

1 participant